找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索本站精品资源

首页 教程频道 查看内容

border在html中是什么意思

作者:模板之家 2021-2-28 12:23 227人关注

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

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)其它相关文章!


路过

雷人

握手

鲜花

鸡蛋
来自: 网络收集

全部回复(0)