本篇主要写了background,border的一些属性,注释的形式多些,单词比较多,但都是一些简单好理解的东西。
<style type="text/css">
.box{
width: 500px;
height: 100px;
/*background: red;*/
/*background 复合属性
url: 地址(本地地址,网络地址);
repeat : 默认值 水平和垂直都铺满;
repeat-x:只铺满水平方向(左右)
repeat-y: 只铺满垂直方向(上下);
no-repeat: 不平铺 (图片放不满,留出空白);
*/
/*background: url(../../../img/1.jpg) no-repeat;
background-size: 50% 50%;
border: 2px solid black;*/
transition: all 2s;
background: url(../../../img/chun.jpg);
background-size: 100%;
/*background-position: 背景图的移动
background-position: 值1 值2;
值1: 水平方向移动的距离
值2: 垂直方向移动的距离
值的形式:
1. left center right top center bottom
2. px(像素)
3. %(百分比)
备注: 背景大小的百分比是参考标签自身的大小
背景移动的百分比市参考图片自身的大小
*/
/*background-position: 50% 50%;*/
/*overflow: scr