网站周围的圆角边框

时间:2017-06-08 14:00:31

标签: css border rounded-corners

我在整个网站上都有边框,效果很好,现在我怎么能让它有圆角呢,我试过了:

border-radius: 25px

但它不起作用,并且正常的边界代码可行,但我需要它四舍五入:

.ct, .cb, .cr, .cl {
border-radius: 25px
background-color: #ffffff;
    position: fixed;
    z-index: 99999;
}
.ct {
border-radius: 25px
  top: 0;
  right: 0;
  left: 0;
  height: 20px;
}
.cr {
border-radius: 25px
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
}
.cb {
border-radius: 25px
  bottom: 0;
  right: 0;
  left: 0;
  height: 20px;
}
.cl {
border-radius: 25px
  top: 0;
  left: 0;
  bottom: 0;
  width: 20px;
}

提前致谢

1 个答案:

答案 0 :(得分:1)

不使用div作为边框,只需使用border:size type color;

https://jsfiddle.net/dcLbza26/



html {
  height: 100vh;
  border: 20px solid red;
  border-radius: 25px;
}




相关问题