向古腾堡圆柱块的外边界添加半径

时间:2019-12-29 20:57:17

标签: css wordpress wordpress-gutenberg

CSS:

.ts-about-columns {
  border: 2px solid #ccc;
  box-sizing: border-box;
  padding:2mm;
  -moz-border-radius: 5 !important;
  -webkit-border-radius: 5 !important;
  border-radius: 5 !important;
}

HTML:

<div class="wp-block-columns ts-about-columns">
  <div class="wp-block-column">
    <h3>Newsletter</h3>
    <p>Please consider ...</p>
    <p>The newsletter is ...</p>
  </div>
  <div class="wp-block-column">
    <h3>Support Forum</h3>
    <p>Have you visited ...</p>
    <p>Feel free to ...</p>
  </div>
</div>

这是页面(WordPress):

https://www.publictalksoftware.co.uk

为什么我不能显示半径的边界?

enter image description here

我正在使用Gutenberg块列,并且已正确设置了附加类。

1 个答案:

答案 0 :(得分:1)

您需要指定单位,例如

border-radius: 5px !important;