html5的表格边框怎么表示实线

html-css010

html5的表格边框怎么表示实线,第1张

<style type="text/css">

<!--

.tableborder {

border-top-width: 1px

border-right-width: 1px

border-bottom-width: 1px

border-left-width: 1px

/*以上分别设置的是表格边框中上右下左的边框宽度*/

border-top-style: solid

border-right-style: solid

border-bottom-style: solid

border-left-style: solid

/*设置边框的表现样式,solid为实线*/

border-top-color: #0000FF

border-right-color: #0000FF

border-bottom-color: #0000FF

border-left-color: #0000FF

/*设置边框的颜色*/

}

-->

</style>

<table width="300" height="100" border="0" align="center" cellpadding="0" cellspacing="0" class="tableborder">

<tr>

<td>class="tableborder"是对样式的调用,写在table标签内</td>

<td></td>

</tr>

</table>

html5让边框发光,就是给那个边框加上一层外阴影,然后使用一个不同于边框的颜色就行了,通过box-shadow来设置,它的一些属性有:X-offset:阴影水平偏移量,其值可以是正负值。如果值为正值,则阴影在对象的右边,其值为负值时,阴影在对象的左边;Y-offset:阴影垂直偏移量,其值也可以是正负值。如果为正值,阴影在对象的底部,其值为负值时,阴影在对象的顶部;阴影模糊半径:此参数可选,,但其值只能是为正值,如果其值为0时,表示阴影不具有模糊效果,其值越大阴影的边缘就越模糊;阴影扩展半径:此参数可选,其值可以是正负值,如果值为正,则整个阴影都延展扩大,反之值为负值时,则缩小;阴影颜色:此参数可选。如不设定颜色,浏览器会取默认色,但各浏览器默认取色不一致,特别是在webkit内核下的safari和chrome浏览器下表现为透明色;这里我写一些代码更容易理解:<html> <head><style>#but{width:200px height:200px box-shadow:-10px 0 10px red, /*左边阴影*/ }</style> </head><body> <div id='but'> <p>我是测试文字</p> </div> </body></html>