【问题标题】:rounded corners border around website网站周围的圆角边框
【发布时间】:2017-06-08 22:06:38
【问题描述】:

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

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;
}

提前致谢

【问题讨论】:

  • 我没有看到任何边框定义。没有它,它什么也做不了。
  • 也没有 ;后边框半径:25px
  • 我想他的边界是这4个类
  • 我添加了:border-radius: 25px;对这些中的每一个,但由于某种原因不起作用。不知道为什么
  • 所有边框半径:25px 缺失;

标签: css border rounded-corners


【解决方案1】:

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

https://jsfiddle.net/dcLbza26/

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

【讨论】:

  • 太棒了,我现在就试试
  • 试过了,但是内部怎么也可以圆角呢?内角,这是显示它现在外观的图像:imgur.com/a/KM3KB
  • 你可以在这里找到一些好的答案:stackoverflow.com/questions/4839613/…
  • 这段代码我试过了,它可以工作了:jsfiddle.net/DXLr9 现在我该如何填充这个截图上显示的部分:imgur.com/PHdr8Qa 2. 我遇到的问题是所有的内部边框都不能再点击了,所有里面有图片,不知道为什么
猜你喜欢
  • 2011-10-05
  • 1970-01-01
  • 1970-01-01
  • 2015-02-14
  • 1970-01-01
  • 1970-01-01
  • 2023-03-18
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多