html5/css3 - July 21

Beginner html5: I also summarized what I learned today.

background: -webkit-gradient(linear,0 0,0 100%,from(#f8f8f8),to(#e6e6e6));
-webkit-box-shadow: 0 1px 1px 0 #c4c4c4;

Note: A gradient in css3, if not clear, you can use the gradient tool.


#tbh5v0 header :before,#tbh5v0 header :after{width: 320px!important;}
Note: This is a newly added function in css3


section:first-child 
section:nth-child(2) 
Note: Get the corresponding section

-webkit-box-flex: 1;
-moz-box-flex :1;
Note: It is mainly to control the proportion of elements in the same row. (not much to say)


 display: inline-block;
Note: When you want to make a label not wrap, but also use padding, etc. to control it, you must use this attribute


.background_size{
    width:200px;
    padding:100px 0 10px;
    background:url(http://image.zhangxinxu.com/image/study/s/s128/mm1.jpg) no-repeat;
    -webkit-background-size:100% 90px;
    -o-background-size:100% 90px;
<pre name="code" class="css">    background-size: contain;  //对图片进行拉伸

 
 
}
注: <span style="font-family: Arial, Helvetica, sans-serif;">background-size属性的用法。</span>








Guess you like

Origin blog.csdn.net/hu_xinxin/article/details/38023603