1、css;
(1)box-shadow:
-moz-box-shadow: 10px 10px 5px #888888; /*老的Firefox*/
box-shadow: 10px 10px 5px #888888;
语法
box-shadow: h-shadow v-shadow blur spread color inset;
注释:box-shadow 向框添加一个或多个阴影。该属性是由逗号分隔的阴影列表,每个阴影由 2-4 个长度值、可选的颜色值以及可选的 inset 关键词来规定。省略长度的值是 0。
值
|
描述
|
测试
|
h-shadow
|
必需。水平阴影的位置。允许负值。
|
|
v-shadow
|
必需。垂直阴影的位置。允许负值。
|
|
blur
|
可选。模糊距离。
|
|
spread
|
可选。阴影的尺寸。
|
|
color
|
可选。阴影的颜色。请参阅 CSS 颜色值。
|
|
inset
|
可选。将外部阴影 (outset) 改为内部阴影。
|
|
示例:
阴影部分用下面的代码来表示:
-
.login-form {
-
background:#eee;
-
width: 26%;
-
margin:9% auto 4% auto;
-
position: relative;
-
-webkit-border-radius: 0.4em;
-
-o-border-radius: 0.4em;
-
-moz-border-radius: 0.4em;
-
box-shadow: rgba(243, 208, 39, 0.33) 1px 1px,
-
rgba(243, 208, 39, 0.33) 2px 2px,
-
rgba(243, 208, 39, 0.33) 3px 3px,
-
rgba(243, 208, 39, 0.33) 4px 4px,
-
rgba(243, 208, 39, 0.33) 5px 5px,
-
rgba(243, 208, 39, 0.33) 6px 6px,
-
rgba(243, 208, 39, 0.33) 7px 7px,
-
rgba(243, 208, 39, 0.33) 8px 8px,
-
rgba(243, 208, 39, 0.33) 9px 9px,
-
rgba(243, 208, 39, 0.33) 10px 10px,
-
rgba(243, 208, 39, 0.33) 11px 11px,
-
rgba(243, 208, 39, 0.33) 12px 12px,
-
rgba(243, 208, 39, 0.33) 13px 13px,
-
rgba(243, 208, 39, 0.33) 14px 14px,
-
rgba(243, 208, 39, 0.33) 15px 15px,
-
rgba(243, 208, 39, 0.33) 16px 16px,
-
rgba(243, 208, 39, 0.33) 17px 17px,
-
rgba(243, 208, 39, 0.33) 18px 18px,
-
rgba(243, 208, 39, 0.33) 19px 19px,
-
rgba(243, 208, 39, 0.33) 20px 20px,
-
rgba(243, 208, 39, 0.33) 21px 21px,
-
rgba(243, 208, 39, 0.33) 22px 22px,
-
rgba(243, 208, 39, 0.33) 23px 23px,
-
rgba(243, 208, 39, 0.33) 24px 24px,
-
rgba(243, 208, 39, 0.33) 25px 25px,
-
rgba(243, 208, 39, 0.33) 26px 26px,
-
rgba(243, 208, 39, 0.33) 27px 27px,
-
rgba(243, 208, 39, 0.33) 28px 28px,
-
rgba(243, 208, 39, 0.33) 29px 29px,
-
rgba(243, 208, 39, 0.33) 30px 30px,
-
rgba(243, 208, 39, 0.33) 31px 31px,
-
rgba(243, 208, 39, 0.33) 32px 32px,
-
rgba(243, 208, 39, 0.33) 33px 33px,
-
rgba(243, 208, 39, 0.33) 34px 34px,
-
rgba(243, 208, 39, 0.33) 35px 35px,
-
rgba(243, 208, 39, 0.33) 36px 36px,
-
rgba(243, 208, 39, 0.33) 37px 37px,
-
rgba(243, 208, 39, 0.33) 38px 38px,
-
rgba(243, 208, 39, 0.33) 39px 39px,
-
rgba(243, 208, 39, 0.33) 40px 40px,
-
rgba(243, 208, 39, 0.33) 41px 41px,
-
rgba(243, 208, 39, 0.33) 42px 42px,
-
rgba(243, 208, 39, 0.33) 43px 43px,
-
rgba(243, 208, 39, 0.33) 44px 44px,
-
rgba(243, 208, 39, 0.33) 45px 45px,
-
rgba(243, 208, 39, 0.33) 46px 46px,
-
rgba(243, 208, 39, 0.33) 47px 47px,
-
rgba(243, 208, 39, 0.33) 48px 48px,
-
rgba(243, 208, 39, 0.33) 49px 49px,
-
rgba(243, 208, 39, 0.33) 50px 50px,
-
rgba(243, 208, 39, 0.33) 51px 51px,
-
rgba(243, 208, 39, 0.33) 52px 52px,
-
rgba(243, 208, 39, 0.33) 53px 53px,
-
rgba(243, 208, 39, 0.33) 54px 54px,
-
rgba(243, 208, 39, 0.33) 55px 55px,
-
rgba(243, 208, 39, 0.33) 56px 56px,
-
rgba(243, 208, 39, 0.33) 57px 57px,
-
rgba(243, 208, 39, 0.33) 58px 58px,
-
rgba(243, 208, 39, 0.33) 59px 59px,
-
rgba(243, 208, 39, 0.33) 60px 60px,
-
rgba(243, 208, 39, 0.33) 61px 61px,
-
rgba(243, 208, 39, 0.33) 62px 62px,
-
rgba(243, 208, 39, 0.33) 63px 63px,
-
rgba(243, 208, 39, 0.33) 64px 64px,
-
rgba(243, 208, 39, 0.33) 65px 65px,
-
rgba(243, 208, 39, 0.33) 66px 66px,
-
rgba(243, 208, 39, 0.33) 67px 67px,
-
rgba(243, 208, 39, 0.33) 68px 68px,
-
rgba(243, 208, 39, 0.33) 69px 69px,
-
rgba(243, 208, 39, 0.33) 70px 70px,
-
rgba(243, 208, 39, 0.33) 71px 71px,
-
rgba(243, 208, 39, 0.33) 72px 72px,
-
rgba(243, 208, 39, 0.33) 73px 73px,
-
rgba(243, 208, 39, 0.33) 74px 74px,
-
rgba(243, 208, 39, 0.33) 75px 75px,
-
rgba(243, 208, 39, 0.33) 76px 76px,
-
rgba(243, 208, 39, 0.33) 77px 77px,
-
rgba(243, 208, 39, 0.33) 78px 78px,
-
rgba(243, 208, 39, 0.33) 79px 79px,
-
rgba(243, 208, 39, 0.33) 80px 80px,
-
rgba(243, 208, 39, 0.33) 81px 81px,
-
rgba(243, 208, 39, 0.33) 82px 82px,
-
rgba(243, 208, 39, 0.33) 83px 83px,
-
rgba(243, 208, 39, 0.33) 84px 84px,
-
rgba(243, 208, 39, 0.33) 85px 85px,
-
rgba(243, 208, 39, 0.33) 86px 86px,
-
rgba(243, 208, 39, 0.33) 87px 87px,
-
rgba(243, 208, 39, 0.33) 88px 88px,
-
rgba(243, 208, 39, 0.33) 89px 89px,
-
rgba(243, 208, 39, 0.33)90px 90px,
-
rgba(243, 208, 39, 0.33)91px 91px,
-
rgba(243, 208, 39, 0.33)92px 92px,
-
rgba(243, 208, 39, 0.33)93px 93px,
-
rgba(243, 208, 39, 0.33)94px 94px,
-
rgba(243, 208, 39, 0.33) 95px 95px,
-
rgba(243, 208, 39, 0.33) 96px 96px,
-
rgba(243, 208, 39, 0.33) 97px 97px,
-
rgba(243, 208, 39, 0.33) 98px 98px,
-
rgba(243, 208, 39, 0.33) 99px 99px,
-
rgba(243, 208, 39, 0.33) 100px 100px,
-
rgba(243, 208, 39, 0.33) 101px 101px,
-
rgba(243, 208, 39, 0.33) 102px 102px,
-
rgba(243, 208, 39, 0.33) 103px 103px,
-
rgba(243, 208, 39, 0.33) 104px 104px,
-
rgba(243, 208, 39, 0.33) 105px 105px,
-
rgba(243, 208, 39, 0.33) 106px 106px,
-
rgba(243, 208, 39, 0.33) 107px 107px,
-
rgba(243, 208, 39, 0.33) 108px 108px,
-
rgba(243, 208, 39, 0.33) 109px 109px,
-
rgba(243, 208, 39, 0.33) 110px 110px,
-
rgba(243, 208, 39, 0.33) 111px 111px,
-
rgba(243, 208, 39, 0.33) 112px 112px,
-
rgba(243, 208, 39, 0.33) 113px 113px,
-
rgba(243, 208, 39, 0.33) 114px 114px,
-
rgba(243, 208, 39, 0.33) 115px 115px,
-
rgba(243, 208, 39, 0.33) 116px 116px,
-
rgba(243, 208, 39, 0.33) 117px 117px,
-
rgba(243, 208, 39, 0.33) 118px 118px,
-
rgba(243, 208, 39, 0.33) 119px 119px,
-
rgba(243, 208, 39, 0.33) 120px 120px,
-
rgba(243, 208, 39, 0.33) 121px 121px,
-
rgba(243, 208, 39, 0.33) 122px 122px,
-
rgba(243, 208, 39, 0.33) 123px 123px,
-
rgba(243, 208, 39, 0.33) 124px 124px,
-
rgba(243, 208, 39, 0.33) 125px 125px,
-
rgba(243, 208, 39, 0.33) 126px 126px,
-
rgba(243, 208, 39, 0.33) 127px 127px,
-
rgba(243, 208, 39, 0.33) 128px 128px,
-
rgba(243, 208, 39, 0.33) 129px 129px,
-
rgba(243, 208, 39, 0.33) 130px 130px,
-
rgba(243, 208, 39, 0.33) 131px 131px,
-
rgba(243, 208, 39, 0.33) 132px 132px,
-
rgba(243, 208, 39, 0.33)133px 133px,
-
rgba(243, 208, 39, 0.33)134px 134px,
-
rgba(243, 208, 39, 0.33)135px 135px,
-
rgba(243, 208, 39, 0.33) 136px 136px,
-
rgba(243, 208, 39, 0.33) 137px 137px,
-
rgba(243, 208, 39, 0.33) 138px 138px,
-
rgba(243, 208, 39, 0.33) 139px 139px,
-
rgba(243, 208, 39, 0.33) 140px 140px,
-
rgba(243, 208, 39, 0.33) 141px 141px,
-
rgba(243, 208, 39, 0.33) 142px 142px,
-
rgba(243, 208, 39, 0.33) 143px 143px,
-
rgba(243, 208, 39, 0.33) 144px 144px,
-
rgba(243, 208, 39, 0.33) 145px 145px,
-
rgba(243, 208, 39, 0.33) 146px 146px,
-
rgba(243, 208, 39, 0.33) 147px 147px,
-
rgba(243, 208, 39, 0.33) 148px 148px,
-
rgba(243, 208, 39, 0.33) 149px 149px,
-
rgba(243, 208, 39, 0.33) 150px 150px,
-
rgba(243, 208, 39, 0.33) 151px 151px,
-
rgba(243, 208, 39, 0.33) 152px 152px,
-
rgba(243, 208, 39, 0.33) 153px 153px,
-
rgba(243, 208, 39, 0.33) 154px 154px,
-
rgba(243, 208, 39, 0.33) 155px 155px,
-
rgba(243, 208, 39, 0.33) 156px 156px,
-
rgba(243, 208, 39, 0.33) 157px 157px,
-
rgba(243, 208, 39, 0.33) 158px 158px,
-
rgba(243, 208, 39, 0.33) 159px 159px,
-
rgba(243, 208, 39, 0.33) 160px 160px,
-
rgba(243, 208, 39, 0.33) 161px 161px,
-
rgba(243, 208, 39, 0.33) 162px 162px,
-
rgba(243, 208, 39, 0.33) 163px 163px,
-
rgba(243, 208, 39, 0.33) 164px 164px,
-
rgba(243, 208, 39, 0.33) 165px 165px,
-
rgba(243, 208, 39, 0.33) 166px 166px,
-
rgba(243, 208, 39, 0.33) 167px 167px,
-
rgba(243, 208, 39, 0.33) 168px 168px,
-
rgba(243, 208, 39, 0.33) 169px 169px,
-
rgba(243, 208, 39, 0.33) 170px 170px,
-
rgba(243, 208, 39, 0.33) 171px 171px,
-
rgba(243, 208, 39, 0.33) 172px 172px,
-
rgba(243, 208, 39, 0.33) 173px 173px,
-
rgba(243, 208, 39, 0.33) 174px 174px,
-
rgba(243, 208, 39, 0.33) 175px 175px,
-
rgba(243, 208, 39, 0.33) 176px 176px,
-
rgba(243, 208, 39, 0.33) 177px 177px,
-
rgba(243, 208, 39, 0.33) 178px 178px,
-
rgba(243, 208, 39, 0.33) 179px 179px,
-
rgba(243, 208, 39, 0.33) 180px 180px,
-
rgba(243, 208, 39, 0.33) 181px 181px,
-
rgba(243, 208, 39, 0.33) 182px 182px
-
}
(2) linear-gradient
几种现代浏览器的内核,主流内容主要有(Gecko)(熟悉的有Firefox,Flock等浏览器)、(熟悉的有Safari、Chrome等浏览器)、(presto)(Opera浏览器)、Trident(讨厌的IE浏览器)
-
background-color: #fff;
-
background-image: -webkit-linear-gradient(top, #FFFFFF 0%, #ddd 100%);
-
background-image: -moz-linear-gradient(top, #FFFFFF 0%, #ddd 100%);
-
background-image: -ms-linear-gradient(top, #FFFFFF 0%, #ddd 100%);
-
background-image: -o-linear-gradient(top, #FFFFFF 0%, #ddd 100%);
-
background-image: linear-gradient(top, #FFFFFF 0%, #ddd 100%);
-
filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0, startColorStr=#FFFFFF, endColorStr=#dddddd );
阅读(736) | 评论(0) | 转发(0) |