html - 在 CSS 中指定边框大小

标签 html css

我有the following fiddle with this content:

<div>

  <div style="border-sizing:70px;border-color:#000000">
    Bla bla
  </div>

</div>

我希望它显示在 border-sizing 中指定大小的黑色边框。但是,该边框不会出现。

知道可能是什么原因吗?

最佳答案

没有border-sizing 属性,您正在寻找border-width。您还需要指定一个 border-style,在您的情况下可能是 border-style:solid

更新 fiddle :https://jsfiddle.net/xvy2epwg/1/

关于html - 在 CSS 中指定边框大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47476285/

相关文章:

html - 从自定义样式 radio 中删除 "border"

html - 'li' + float 使 Internet Explorer 6 崩溃

javascript - 将 php 变量传递给 jquery 以及从 jquery 传递给 php

css - 如何仅在 border-top 上使用 border-image?

javascript - 内联 SVG 背景图像在 React.js 中不起作用

html - 将元素添加到页面底部

javascript - html() 中的 jQuery 编码

html - 如何在图片前面放置下拉框?

javascript - 如何调整 CSS/JS 中字体的大小,使其相对于其容器的两侧有一定的边距?

css - IE8 忽略选择器过多的规则