当前阅读教程:CSS入门到精通 > 轮廓宽度 outline-width | |||||||||||||||||||||
阅读(22555525) 收藏 赞(5685) 分享 | |||||||||||||||||||||
上一篇: 轮廓样式 outline-style | 下一篇: 简写属性outline | ||||||||||||||||||||
浏览器支持表格中的数字表示支持该属性的第一个浏览器版本号 属性定义及使用说明outline(轮廓)是绘制于元素周围的一条线,位于边框边缘的外围。 outline-width指定轮廓的宽度。 注意: 请始终在outline-width属性之前声明outline-style属性。元素只有获得轮廓以后才能改变其轮廓的宽度。
属性值
实例代码<!doctype html> <html> <head> <meta charset="utf-8"> <title>轮廓宽度 outline-width</title> <!--定义内部样式--> <style> .one{ border:red solid thin; /*边框*/ outline-style:solid; outline-width:thin; outline-offset: 3px; /*边框和轮廓的距离*/ } .two{ border:red solid thin; /*边框*/ outline-style:dotted; outline-width:3px; outline-offset: 3px; /*边框和轮廓的距离*/ } </style> </head> <body> <p>This is some text in a paragraph.</p> <p>This is some text in a paragraph.</p> <p><b>注释:</b>只有在规定了 !DOCTYPE 时,Internet Explorer 8 (以及更高版本) 才支持 outline-width 属性。</p> </body> </html> 效果图 |
|||||||||||||||||||||
上一篇: 轮廓样式 outline-style | 下一篇: 简写属性outline |