html边框线怎么设置,html边框线怎么设置颜色

html边框线怎么设置呢?今天一起来看一下吧 。

html边框线怎么设置,html边框线怎么设置颜色


方法

新建一个html文件如图所示 。

html边框线怎么设置,html边框线怎么设置颜色


在head里面添加上style样式 。
html边框线怎么设置,html边框线怎么设置颜色


在body中添加一个div盒子 。
html边框线怎么设置,html边框线怎么设置颜色


在style中为div添加360新知样式 , 将其宽高设置为400px并填充蓝色 。
html边框线怎么设置,html边框线怎么设置颜色


效果如图所示 。
html边框线怎么设置,html边框线怎么设置颜色


在style中的div样式中输入border: 10px solid yellow 为其添加一个10px的实现边框 。
html边框线怎么设置,html边框线怎么设置颜色


效果如图所示 。
html边框线怎么设置,html边框线怎么设置颜色


如果将其中的solid替换成dotted 。
html边框线怎么设置,html边框线怎么设置颜色


即可使为其添加的边框更改为点状式 。
html边框线怎么设置,html边框线怎么设置颜色


如果将其中的solid替换成dashed 。
html边框线怎么设置,html边框线怎么设置颜色


【html边框线怎么设置,html边框线怎么设置颜色】
即可使为其添加的边框更改为虚线式 。
html边框线怎么设置,html边框线怎么设置颜色


相关经验推荐