请问这个样式用css3怎么写呢?请大家帮下忙啊

html-css017

请问这个样式用css3怎么写呢?请大家帮下忙啊,第1张

#Sample    {

    margin:0 auto /*居中*/

    width:80%

    height:50px

    background-color:#EEE

    border:2px solid #666 /* 宽度 样式 颜色 */

    border-radius:5px /* 分开写可以控制每个角 5px 5px 5px 5px,从左上顺时针设置 */

    box-shadow:0 0 5px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.8)/* 每个盒子阴影效果之间用,分开;inset代表内部阴影;x方向 y方向 模糊值 rgba/16进制表示颜色,rgba(红,绿,蓝,透明度)黑色0,0,0白色255,255,255透明度最大1,16进制#000表示无法设置透明度 */

    

}

border-radius和box-shadow需要浏览器对css3支持,IE9部分支持,低于IE9需要hack,其他浏览器最新版本基本都支持。较老版本需要加前缀比如 -webkit-border-radius: 代表safari等webkit浏览器,-o-代表opera,-moz-代表firefox;

边框周围3个颜色很清楚了,一个是边框本身的颜色,一个是外阴影颜色,一个是内阴影颜色。

1, css3圆形光环闪烁效果。

2,文件引用:,

<style type="text/css">

body{background: #EF7148}

img{cursor:pointer-webkit-animation: scaleout 1.3s infinite ease-in-outanimation: scaleout 1.3s infinite ease-in-out}

@-webkit-keyframes scaleout {

0% { -webkit-transform: scale(1.0) }

100% {

-webkit-transform: scale(1.1)

opacity: 0

}

}

@keyframes scaleout {

0% {

transform: scale(1.0)

-webkit-transform: scale(1.0)

} 100% {

transform: scale(1.1)

-webkit-transform: scale(1.1)

opacity: 0

}

}

</style>