三要素:宽border-width,形状border-style,颜色border-color

盒模型中--border

<style>
div{
width:300px;
height:300px;
background:blue;
border:50px solid green;
}
</style>
<body>
<div>
盒模型
</div>
</body>

solid是实线的意思、

dashed是虚线、

盒模型中--border

dotted是点线;

盒模型中--border

形状有很多的……以上是对盒子的整体设置border,而对于一边,设置只需border-top或border-bottom,border-right,border-left。不管哪边,都是有三要素的;border-top-style:dashed……

盒模型中--border

<style>

div{

width:300px;
height:300px;
background:blue;
border-top-width:10px;
border-top-style:dashed;
border-top-color:green;
}
</style>
<body>
<div>
盒模型
</div>

 

相关文章:

  • 2022-12-23
  • 2021-12-01
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2021-07-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2021-08-31
  • 2022-01-11
  • 2021-08-13
  • 2021-10-15
相关资源
相似解决方案