【HTML】CSS基础学习之背景边框文字文本的学习 admin 102369文章 87评论 2022年1月10日03:31:28评论16 views字数 1135阅读3分47秒阅读模式 css背景文本框使用代码及注释 demo3 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <!--字符集 --> <title>demo3</title> <!--背景颜色 --> <style> body{ /* background-image: url(1.jpg); 图片背景 background-repeat: no-repeat; 背景不重复 background-size: 200px; 图片像素大小 background-attachment: fixed; 图片固定于页面 background-position: center top; 图片显示中间顶部 */ /*简写方式*/ /* background: url(1.jpg) no-repeat fixed center top; */ font-family: "微软雅黑" arial; font-size: 22px; color: #808080; font-weight: bold; font-variant: small-caps; } /*边框*/ .div1{ width: 400px; height: 400px; /* border-width: 10px; border-color: red; */ /*border-style: double ridge inset outset; */ border-left: solid; border-right: double; border-top: solid; border-bottom: double; text-align: center; } .div1 p{ line-height: 30px; letter-spacing: 10px; } p{ text-indent: 20px; text-decoration: line-through; } </style></head><body> <!--边框 --> <div class="div1"> div1 <p> asdadadsadasdasdasd asdadadsadasdasdasd asdadadsadasdasdasd asdadadsadasdasdasd asdadadsadasdasdasd </p> </div> <p>this is my heart</p> </body></html> 我的个人博客 孤桜懶契:http://gylq.github.io FROM:gylq.gitee Author:孤桜懶契 点赞 https://cn-sec.com/archives/729961.html 复制链接 复制链接 左青龙 微信扫一扫 右白虎 微信扫一扫
评论