【代码笔记】Web-CSS-CSS background背景,分享


一,效果图。

【代码笔记】Web-CSS-CSS background背景,

二,代码。

【代码笔记】Web-CSS-CSS background背景,

<!DOCTYPE html> <html>  <head>     <meta charset="utf-8">     <title>CSS backgrounds</title>     <style>     h1 {         background-color: #6495ed;     }          p {         background-color: #e0ffff;     }          div {         background-color: #b0c4de;     }          body {         background-image: url('paper.gif');         background-color: #cccccc;         background-repeat: no-repeat;         background-position: right top;         margin-right: 200px;     }          body {         background: #ffffff url("img_tree.png") no-repeat right top;         margin-right: 200px;     }     </style> </head>  <body>     <h1>CSS background-color实例!</h1>     <div>改文本插入在div元素中.</div>     <p>该段落有自己的背景颜色</p>     <p>背景图片不重复,设置position实例</p>     <p>背景图片只显示一次,并与文本分开</p>     <p>实例中还添加了margin-right属性用于让图片与文本间隔开</p> </body>  </html>

【代码笔记】Web-CSS-CSS background背景,

参考资料:《菜鸟教程》

www.dengb.comtruehttps://www.dengb.com/HTML_CSS/1332869.htmlTechArticle【代码笔记】Web-CSS-CSS background背景, 一,效果图。 二,代码。 ! DOCTYPE html html head meta charset =”utf-8″ title CSS backgrounds / title style h1 { backgro…

—-想了解更多的css相关样式处理怎么解决关注<计算机技术网(www.ctvol.com)!!>

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/csstutorial/108943.html

(0)
上一篇 2020年5月4日
下一篇 2020年5月4日

精彩推荐