css 基础
css3基础 html嵌套样式: 1.外部  比较推荐的方法
2.内部
3.内联  不建议使用
样式表写法 img {    background : red;     border-radius : 200px ;      } 
 
css优先级 1 内联styl
2 id选择器  id是唯一 不能重复
3 class选择器
4 标签
css长度单位 1 px
2 em 倍数
css选择器 1 常用选择器
2 基本选择器
3 层级选择器
4 伪类选择器
5 属性选择器
常用选择器: 1.标签选择器 html span  h1 h2  from …
2.id选择器   -> 前面有#
3 类选择器  —>前面有 点
<style>     img{         background: red;         border-radius: 200px;         /*  方法叫做内部 */     }     #imgid {         background:yellow;     }     .imgclass{         background: chocolate;     } </style>  <img src="1.jpg" id="imgid" class="imgclass" alt="1"> 
 
4 关联选择器
父类往下找
<style>     .div2 .imgclass{         background: chocolate;         border-right: double;     } </style> <div class="div1">         <img src="1.jpg" id="imgid1" class="imgclass" alt="1"> </div> <div class="div2">         <img src="1.jpg" id="imgid" class="imgclass" alt="1"> </div> 
 
5 组合选择器
并列使用同一种样式
<style>     .div2 .imgclass, .div3 .imgclass{         background: chocolate;         border-right: double;     } </style> <div class="div1">         <img src="1.jpg"  class="imgclass" alt="1"> </div> <div class="div2">         <img src="1.jpg"  class="imgclass" alt="1"> </div> <div class="div3">         <img src="1.jpg"  class="imgclass" alt="1"> </div> 
 
基本选择器 
:first-child
有四张图片,只有第一个生效, 找到四个元素,但是只有第一个生效
<style>     img:first-child{         background: chocolate;         border-right: double;     } </style> <body>     <img src="1.jpg"  class="imgclass" alt="1">     <img src="1.jpg"  class="imgclass" alt="1">     <img src="1.jpg"  class="imgclass" alt="1">     <img src="1.jpg"  class="imgclass" alt="1"> </body> 
 
?
 
: first-letter
`第一个字符`
         <!DOCTYPE html>           <html  lang ="en" >           <head >               <meta  charset ="UTF-8" >               <title > css</title >           <style > * {     font-family : "微软雅黑 Light" ; } p :first-letter  {    font-size : 80px ;     margin-left : 20px ;      } </style >  
 
  
<h1>css测试</h1>
<p>系统linux front test linux front testlinux front testlinux front testlinux front test</p>
 
  ? * :first-line   `第一行`   ```html   <!DOCTYPE html>   <html lang="en">   <head>       <meta charset="UTF-8">       <title>css</title>   <style>       * {           font-family: "微软雅黑 Light";       }       p:first-line {           font-size: 40px;           margin-left: 202px;           /*  段落标签 第一个字符大小为80x,且缩进20 px */       }   </style>   </head>       <body>           <h1>css测试</h1>           <p>系统 linux front test linux front               testlinux front testlinux front testlinux front test</p>       </body>   </html> 
 
?
 
:last-child
和first-child 相反只有最后一个元素生效
 
:nth-child(3)
选择三个生效
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     img :nth-child(3)  {         background : chocolate;         border-right : double;     } </style >      </head > <body >     <img  src ="1.jpg"   class ="imgclass"  alt ="1" >      <img  src ="1.jpg"   class ="imgclass"  alt ="1" >      <img  src ="1.jpg"   class ="imgclass"  alt ="1" >      <img  src ="1.jpg"   class ="imgclass"  alt ="1" >  </body > </html > 
 
?
 
 
层级选择器 a,ba ba>b
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     * {         font-family : "微软雅黑 Light" ;     }     .div1 >h1 {         background : #ccc ;              } </style > </head > <body >     <div  class ="div1" >          <h1 > aaaaaaaaaaaaaaaaaaaaaaaaaaaaa1</h1 >                   <div  class ="div11" >              <div  class ="div111" >                  <h1 > aaaaaaaaaaaaaaaaaaaaaaaaaaaaa11</h1 >                  <h1 > dsfsdfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</h1 >              </div >          </div >      </div >      <div  class ="div2" >      </div >  </body > </html > 
 
a+b
后面的第一个元素
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     * {         font-family : "微软雅黑 Light" ;     }     .div1 +h1 {         background : #ccc ;              } </style > </head > <body >     <div  class ="div1" >          <h1 > aaaaaaaaaaaaaaaaaaaaaaaaaaaaa1</h1 >                   <div  class ="div11" >              <div  class ="div111" >                  <h1 > aaaaaaaaaaaaaaaaaaaaaaaaaaaaa11</h1 >                  <h1 > dsfsdfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaa111</h1 >              </div >          </div >      </div >           <h1 > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a</h1 >      <h1 > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa b</h1 >  </body > </html > 
 
伪类选择器 
:hover 
:focus 
::selection 
 
:hover
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     * {         font-family : "微软雅黑 Light" ;     }     img :hover  {         background : blueviolet;         border-bottom : 2px ;              } </style > </head > <body >     <img  src ="1.jpg"  alt ="" >  </body > </html > 
 
:focus
表单元素获得焦点聚焦
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     * {         font-family : "微软雅黑 Light" ;     }    .username :focus  {        background : #ff0 ;                outline-color : chartreuse;    }      </style > </head > <body >     <form  action ="" >          <p > 用户名:</p >          <p > <input  type ="text"  class ="username" > </p >          <p > <input  type ="submit"  value ="ok" > </p >      </form >  </body > </html > 
 
::selection
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     * {         font-family : "微软雅黑 Light" ;     }          p ::selection  {         background : darkmagenta;              } </style > </head >     <body >          <h1 > css测试</h1 >          <p > 系统 linux front test linux front             testlinux front testlinux front testlinux front test</p >      </body >  </html > 
 
属性选择器 
[id]
 
? [id=us]  等于us
 
? [name*=us]  name包含us 既满足条件
 
? [name^=en]  name以en开头既满足条件
[name$=en] name以en结尾即满足条件
 
 
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     * {         font-family : "微软雅黑 Light" ;     }     input [name=username]  {         outline-color : darkred;              }     input [name=username]  {         outline-color : darkred;                     可以是其他标签  不一定name         */      }     input [name=passwd]  {          outline-color : blue;              } </style > </head > <body >     <form  action ="" >          <p > 用户名:</p >          <p > <input  type ="text"  name ="username"  class ="username" > </p >          <p > 密码:</p >          <p > <input  type ="password"  name ="passwd"   class ="passwd" > </p >          <p > 邮箱:</p >          <p > <input  type ="email"  name ="email"   class ="email" > </p >          <p > <input  type ="submit"  value ="ok" > </p >      </form >  </body > </html > 
 
常见的样式属性和值 1字体与颜色
2背景属性
3文本属性
4边框属性
5鼠标光标属性
6样式属性
7定位属性
8内外边框
9浮动和清除浮动
10滚动条
11显示和隐藏
1字体与颜色 font  1 font-family //字体类型
//字体名称:楷体 宋体 黑体…
2 font-size //字体大小
//30px
3 font-style //字体样式
// normal | itaic
4 font-weight //字体粗细
//bold
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     * {         font-family : "新宋体" ;                     1. 字体类型         */                           自定义字体 :             font-family: "自定义";             src: url('自定义.ttf');         */      }     h1  {         font-size : 100px ;                    2。 字体大小         */      }     p  {         font-style : inherit;                     3. 斜体          */          font-weight : bold;                     4. 字体粗细          */      } </style > </head > <body >     <h1 > 字体</h1 >      <p > dsffjsafdsfadsfadsfadssssssssssfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasdddddddddddddddddddddddd</p >  </body > </html > 
 
2背景属性 background 1. background-color
2. background-image
3. background-repeat
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     * {         font-family : "新宋体" ;     }     div  {         width : 500px ;         height : 500px ;         background-color : #ccc  ;                  background-image :url ("1.jpg" );                  background-repeat : no-repeat;              } </style > </head > <body >     <div >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >      </div >  </body > </html > 
 
4.background-attachment
5. background-psoition
?   1.水平: left center right; 垂直:top center bottom
?   2.50px 50px
?   3.-50px -50px
4. 50% 50% 
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     * {         font-family : "新宋体" ;     }     body   {         background-color : #ccc  ;                  background-image :url ("1.jpg" );                  background-repeat : no-repeat;                  background-attachment : fixed;                  background-position : 50%  50% ;                         background : #ccc  url ("1.jpg" ) no-repeat fixed 50%  50% ;              } </style > </head > <body >         <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >          <h1 > os  linux   apache  nginx</h1 >  </body > </html > 
 
3文本属性 word-spacing 词间距
letter-spacing 字间距 
text-decoration
值   描述 none    默认。定义标准的文本。 underline   定义文本下的一条线。 overline    定义文本上的一条线。 line-through    定义穿过文本下的一条线。 blink   定义闪烁的文本。 inherit 规定应该从父元素继承 text-decoration 属性的值。
字体行高<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     * {         font-family : "新宋体" ;     }     p {                           字间距          *!*/                                                                                                                                                                    } </style > </head > <body >     <h1 > 字体</h1 >      <p > linux unix dsffjsafdsfadsfadsfadssssssssssfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasdddddddddddddddddddddddd</p >  </body > </html > 
对齐 <!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >  <style >     * {         font-family : "新宋体" ;     }     p {         text-align : center;         text-align : left;         text-align : right;              } </style > </head > <body >     <h1 > 字体os</h1 >      <p > linux unix forgt apple blue</p >  </body > </html > 
 
4 边框属性 
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >         div {             width : 1000px ;             height : 100px ;             background : #ccc ;             border :12px  solid #f0f ;                                          凹进去的槽线 凸出来的槽线 grove 凹进去 ridge 凸出来              */          }      </style >  </head > <body >     <div >          <span > html5 + css3 </span >      </div >  </body > </html > 
 
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >         div {             width : 1000px ;             height : 100px ;             border-right : 10px  ridge #f22 ;                                   }      </style >  </head > <body >     <div >          <span > html5 + css3 </span >      </div >  </body > </html > 
 
可以控制字体方位的应用
5鼠标光标属性 <!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >         p  {             width : 100px ;             height : 10px ;             border-left : 11px  ridge #f22 ;             cursor : crosshair;                                          text 默认I    default 按原来什么都不变                 help 获取帮助样式鼠标?             */          }      </style >  </head > <body >         <p > html5 + css3 </p >          <p > html5 + css3 </p >          <p > html5 + css3 </p >          <p > html5 + css3 </p >  </body > </html > 
 
列表样式 <!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >         ul {             background : forestgreen;             padding : 0px ;               list-style-type : none ;                             none 什么都没有                 disc 实心圆 默认                 circle 空心圆                 square 实心方块                 decimal 数字   有序列表使用这个                 lower-roman  小写罗马数字                 upper-roman  大写罗马数字                 lower-roman  小写字母                 upper-alpha  大写字母             */          }         ul  a {             color : aqua;         }      </style >  </head > <body >     <ul >          <li > <a  href ="" > 百度</a > </li >          <li > <a  href ="" > 百1度</a > </li >          <li > <a  href ="" > 百2度</a > </li >          <li > <a  href ="" > 百3度</a > </li >          <li > <a  href ="" > 百4度</a > </li >      </ul >  </body > </html > 
 
使用ul制作导航菜单
尺寸 weight 
min-weight
最小宽度
限定文本框textarea样式
resize:none
width:200px 
height:300px 
样式继承特点:与文字有关的都会被继承
表格 
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >       table {           width : 1000px ;            border : 3px  solid chartreuse;           border-collapse : collapse;                  }         td ,th {             text-align : center;                           border : 3px  solid chartreuse;         }      </style >  </head > <body >     <table >          <tr >          <th > 编号</th >          <th > 用户名称</th >          <th > 密码</th >          </tr >          <tr >              <td > 1</td >              <td > user1</td >              <td > passssd123432</td >          </tr >         <tr >              <td > 1</td >              <td > user1</td >              <td > passssd123432</td >          </tr >         <tr >              <td > 1</td >              <td > user1</td >              <td > passssd123432</td >          </tr >         <tr >              <td > 1</td >              <td > user1</td >              <td > passssd123432</td >          </tr >         <tr >              <td > 1</td >              <td > user1</td >              <td > passssd123432</td >          </tr >         <tr >              <td > 1</td >              <td > user1</td >              <td > passssd123432</td >          </tr >      </table >  </body > </html > 
 
定位 1.position: absolute; 绝对 <!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >         *{             margin : 0px ;         }         img  {             position : absolute;                          left : 20px ;             top :20px ;         }      </style >  </head > <body >         <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <img  src ="5.png"  alt ="" >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >  </body > </html > 
 
2.position:relative; 相对 <!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >         *{             margin : 0px ;         }         img  {             position : relative;                             相对定位原来所占用的空间不会释放                 绝对定位 绝对定位                 相同点: 都脱离了文档流                 不同点   坐标系不同,绝对的坐标系在浏览器的左上角,相对的坐标系在自己的左上角;                         占不占位, 相对占位;              */              left : 20px ;             top :200px ;         }      </style >  </head > <body >         <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <img  src ="5.png"  alt ="" >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >          <h1 > sssssssssssssss</h1 >  </body > </html > 
 
z-index 定位高度 <!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >         *{             margin : 0px ;         }         img  {             position : absolute;             left : 200px ;             top :200px ;         }         .img1 {             z-index : 1 ;                      }      </style >  </head > <body >         <img  src ="5.png"  class ="img1" >          <img  src ="5.png"  class ="img2" >  </body > </html > 
 
实现div绝对居中的方法:
1 父div: position: relative;
2.子div:position: absolute;
父定位子绝对,子的坐标是父的左上角
8内外边框 
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >         *{           font-family : "Colonna MT" ;             margin : 0px ;                      }     .img {         background : #ff1 ;         margin-bottom : 10px ;              }         .img :last-child {             margin-bottom : 0px ;                      }      </style >  </head > <body >        <div  class ="img" > <img  src ="5.png" > </div >         <div  class ="img" > <img  src ="5.png" > </div >         <div  class ="img" > <img  src ="5.png" > </div >         <div  class ="img" > <img  src ="5.png" > </div >  </body > </html > 
 
margin:20px;  上下左右 margin:5px 0px; 上下,左右面 margin:0px 5px 5px; 上,左右, 下 margin:0px 5px 0px 5px; 上右下左;
9浮动 
值 
描述 
 
 
left 
元素向左浮动。 
 
right 
元素向右浮动。 
 
none 
默认值。元素不浮动,并会显示在其在文本中出现的位置。 
 
inherit 
规定应该从父元素继承 float 属性的值。 
 
 
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >         *{           font-family : "Colonna MT" ;                      }     .img {         background : #ff1 ;         margin-bottom : 10px ;              }         .img {             background : #ccc ;             width : 200px ;             height : 200px ;             float : left;             margin-left : 100px ;         }         .row {             margin-bottom : 10px ;         }      </style >  </head > <body > <div  class ="row" >        <div  class ="img" > <img  src ="5.png" > </div >         <div  class ="img" > <img  src ="5.png" > </div >         <div  class ="img" > <img  src ="5.png" > </div >         <div  class ="img" > <img  src ="5.png" > </div >      <div  style ="clear: both" > </div >      </div >         <div  class ="img" > <img  src ="5.png" > </div >         <div  class ="img" > <img  src ="5.png" > </div >         <div  class ="img" > <img  src ="5.png" > </div >         <div  class ="img" > <img  src ="5.png" > </div >      <div  style ="clear: both" > </div >         </div >  </body > </html > 
 
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >         .div1 {             width : 100px ;             height : 100px ;             background : #ccc ;             float : left;         }         .div2  {             width : 105px ;             height :105px ;             background : red;         }         .div3  {             width : 105px ;             height :105px ;             background : darkslategray;             clear : left;                      }      </style >  </head > <body >     <div  class ="div1" > </div >      <div  class ="div2" > </div >      <div  class ="div3" > </div >  </body > </html > 
 
清除浮动: 1.clear:left #浮动之后左侧不能有人 2.clear:right #浮动之后右侧不能有人 3.clear:both #浮动之后左右侧都不能有人 #可以有效的防止盒子回缩 
 
10滚动条 
值 
描述 
 
 
visible 
默认值。内容不会被修剪,会呈现在元素框之外。 
 
hidden 
内容会被修剪,并且其余内容是不可见的。 
 
scroll 
内容会被修剪,但是浏览器会显示滚动条以便查看其余的内容。 
 
auto 
如果内容被修剪,则浏览器会显示滚动条以便查看其余的内容。 
 
inherit 
规定应该从父元素继承 overflow 属性的值。 
 
 
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >         div {             width : 1000px ;             height :200px ;             border : 2px  solid #ccc ;             overflow : scroll;                      }      </style >  </head > <body >     <div  class ="div1" > <h1 >  linux os appcle linux os appclelinux os appclelinux os appclelinux os appclelinux os appclelinux os appclelinux os appcle linux os appclelinux os appclelinux os appcle</h1 > </div >  </body > </html > 
 
11显示和隐藏 1.display
none 
此元素不会被显示。 
 
 
block 
此元素将显示为块级元素,此元素前后会带有换行符。 
 
inline 
默认。此元素会被显示为内联元素,元素前后没有换行符。 
 
inline-block 
行内块元素。(CSS2.1 新增的值) 
 
list-item 
此元素会作为列表显示。 
 
run-in 
此元素会根据上下文作为块级元素或内联元素显示。 
 
compact 
CSS 中有值 compact,不过由于缺乏广泛支持,已经从 CSS2.1 中删除。 
 
marker 
CSS 中有值 marker,不过由于缺乏广泛支持,已经从 CSS2.1 中删除。 
 
table 
此元素会作为块级表格来显示(类似  
 
inline-table 
此元素会作为内联表格来显示(类似  
 
table-row-group 
此元素会作为一个或多个行的分组来显示(类似    )。 
table-header-group 
此元素会作为一个或多个行的分组来显示(类似 )。  
 
table-footer-group 
此元素会作为一个或多个行的分组来显示(类似   )。 
table-row 
此元素会作为一个表格行显示(类似   )。
 
table-column-group 
此元素会作为一个或多个列的分组来显示(类似 )。  
 
table-column 
此元素会作为一个单元格列显示(类似  ) 
 
table-cell 
此元素会作为一个表格单元格显示(类似   和  ) 
 
table-caption 
此元素会作为一个表格标题显示(类似 )  
 
inherit 
规定应该从父元素继承 display 属性的值。 
 
display 显示要注意是行 还是块block
2.visibility 
值 
描述 
 
 
visible 
默认值。元素是可见的。 
 
hidden 
元素是不可见的。 
 
collapse 
当在表格元素中使用时,此值可删除一行或一列,但是它不会影响表格的布局。被行或列占据的空间会留给其他内容使用。如果此值被用在其他的元素上,会呈现为 “hidden”。 
 
inherit 
规定应该从父元素继承 visibility 属性的值。 
 
 
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >             .line1 {                 display : none;                                  visibility : hidden;                              }                   </style >  </head > <body >     <h1  class ="line1" > 1 aaaaaaaaaaaaaaaaa</h1 >      <h2  class ="line2" > 2 aaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbb</h2 >      <h2  class ="line3" > 3 aaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbb</h2 >  </body > </html > 
 
css3 边框样式
<!DOCTYPE html> <html  lang ="en" > <head >     <meta  charset ="UTF-8" >      <title > css</title >      <style >             div {                 background : #ccc ;                 width : 200px ;                 height : 200px ;                 border-radius : 5px ;                 border-radius : 5px  20px ;                                  border-radius : 5px  20px  20px ;                              }      </style >  </head > <body >     <div >          <img  src ="23.jpg"  alt ="" >      </div >  </body > </html > 
 
box-shadow
值 
描述 
测试 
 
 
h-shadow  
必需。水平阴影的位置。允许负值。 
测试  
 
v-shadow  
必需。垂直阴影的位置。允许负值。 
测试  
 
blur  
可选。模糊距离。 
测试  
 
spread  
可选。阴影的尺寸。 
测试  
 
color  
可选。阴影的颜色。请参阅 CSS 颜色值。 
测试  
 
inset 
可选。将外部阴影 (outset) 改为内部阴影。 
测试