To achieve a box-shadow effect as a border in CSS with a white color, you can use the following code:

.box {
  width: 200px;
  height: 200px;
  background-color: #f1f1f1;
  box-shadow: 0 0 0 10px white;
}

In the code above, we set the width and height of the box to 200 pixels, and the background color to a light gray (#f1f1f1). The box-shadow property is then used to create a shadow effect as if it were a border. The four values in the box-shadow property represent the horizontal offset, vertical offset, blur radius, and spread radius respectively. In this case, we set all of them to 0 except the spread radius, which we set to 10px. Finally, we set the color of the shadow to white

i want box-shadow as border in css with white color

原文地址: https://www.cveoy.top/t/topic/in4v 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录