border在html中的意思:border属性是在一个声明中设置所有边框属性,语法为【Object.style.border=borderWidth borderStyle borderColor】。

本教程操作环境:windows7系统、html5版,DELL G3电脑,该方法适用于所有品牌电脑。 border在html中的意思: border 属性在一个声明中设置所有边框属性。
语法: Object.style.border=borderWidth borderStyle borderColor 实例 本例改变元素的边框: <html>
<head>
<style type="text/css">
p
{
border: thin dotted #FF0000
}
</style>
<script type="text/javascript">
function changeBorder()
{
document.getElementById("p1").style.border="thick solid #0000FF";
}
</script>
</head>
<body>
<input type="button" onclick="changeBorder()"
value="Change border" />
<p id="p1">This is a paragraph</p>
</body>
</html> 相关学习推荐:html视频教程
以上就是border在html中是什么意思的详细内容,更多请关注模板之家(www.mb5.com.cn)其它相关文章! |