当前位置 : 主页 > 网页制作 > css >

CSS(设置边框)

来源:互联网 收集:自由互联 发布时间:2021-06-13
1 !DOCTYPE html 2 html 3 head lang="en" 4 meta charset="UTF-8" 5 title/title 6 style type="text/css" 7 8 div { 9 border-style : solid ; 10 border-color : blueviolet ; 11 border-width : 2px ; 12 height : 200px ; 13 14 //塌缩collapse 15 } 1

 1 <!DOCTYPE html>
 2 <html>
 3 <head lang="en">
 4     <meta charset="UTF-8">
 5     <title></title>
 6     <style type="text/css">
 7 
 8         div{
 9             border-style: solid;
10             border-color: blueviolet;
11             border-width: 2px;
12             height: 200px;
13 
14             //塌缩collapse
15         }
16     </style>
17 </head>
18 <body>
19 
20 <div></div>
21 </body>
22 </html>

 

 1 <!DOCTYPE html>
 2 <html>
 3 <head lang="en">
 4     <meta charset="UTF-8">
 5     <title></title>
 6     <style type="text/css">
 7 
 8         div{
 9             width: 300px;
10             height: 200px;
11             border: solid 2px;
12             background-color: antiquewhite;
13             background-repeat: repeat-x;
14             background-attachment: fixed;
15             background-position-x: ;
16         }
17     </style>
18 </head>
19 <body>
20 <div></div>
21 </body>
22 </html>
网友评论