#WEB安全基础 : HTMLCSS | 0x8CSS进阶

#WEB安全基础 : HTMLCSS | 0x8CSS进阶,第1张

#WEB安全基础 : HTML/CSS | 0x8CSS进阶

你以为自己学这么点CSS就厉害了?

学点新东西吧,让你的网页更漂亮


我们只需要用到图片和网页

 

这是index.html的代码

 <html>
 <head>
 <title>Head First Lounge</title>
 </head>
 <style>
 body{
 margin-left: 15%;
 margin-right: 15%;
 font-family: sans-serif;
 padding: 10px 10px 10px 10px;
 border: 3px solid green;
 }
 p.myp{
 background-color: pink;
 color: blue;
 }
 </style>
 <body>
 <h1>Welcome to the Head First Lounge</h1>
 <img src = "images/drinks.jpg" alt = "果汁" title = "果汁" width = "400" height = "200">
 <P>Join us any evening for refreshing elixirs, conversation and maybe a game of two of <em>Dance Revolution</em>Wireless access is always provided;BYOWS (Brinf you Web server).
 </p>
 <h2>Directions</h2>
 <p class = "myp">
 You'll find us right in the center of downtown Website. Come join us!
 </p>
 </body>
 </html>
 <!--
 background-color: pink;        <p>标签的背景颜色
 -->

请看效果

 

我添加了元素的背景颜色,结合学过的class(类)自己试试能不能让它变得更漂亮


//本系列教程基于《Head First HTML与CSS(第二版)》,此书国内各大购物网站皆可购买


转载请注明出处  by:M_ZPHr

最后修改日期:2019-01-17

 

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/587085.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-12
下一篇 2022-04-12

发表评论

登录后才能评论

评论列表(0条)

保存