HTML5 rgba 与shaodow、radius综合
css
*{ margin: 0px; padding: 0px; } div{ background:blue; width:400px; height:200px; margin:50px auto; padding:50px; position:relative; font-size:40px; font-family:\5FAE\8F6F\96C5\9ED1; text-align:center; font-weight:bolder; line-height:150px; /* rgba 设置背景颜色 包括透明度 */ background-color: rgba(255,23,234,0.4); box-shadow:0px 0px 20px rgba(0,0,0,0.4) inset; text-shadow:0px 0px 5px rgba(0,0,0,0.4); border-radius: 20px 20px 20px 20px; }
html
<div style="position:absolute; top:100px; "></div> <div> yokoboy </div> <div style="position:absolute; top:100px;right: 0px;"></div>
不过在IE8- 上面就有点可怕了,所以慎用吧!