【发布时间】:2021-06-14 11:30:14
【问题描述】:
我正在尝试创建一个类似链接中的博客:http://www.wikihow.com/Grow-Flowers-from-Seed
每个步骤都有单独的部分,圆角,不同的背景颜色和中心对齐。
到目前为止,我在 wordpress 中写的是:
<div style="width: 90%; background-color: #eaeaea;">
<a href="http://prelaunch.biocarve.com/blog/wp-content/uploads/2015/12/670px-Grow-Flowers-from-Seed-Step-1.jpg"><img class=" size-medium wp-image-258 aligncenter" src="http://prelaunch.biocarve.com/blog/wp-content/uploads/2015/12/670px-Grow-Flowers-from-Seed-Step-1-300x225.jpg" alt="Grow Flowers From Seeds step1" width="450" /></a>
<div style="width: 5%; padding: 0 10pt 0 0; float: left; background-color: #eaeaea;">
<b>1</b>
</div>
<div class="step" style="width: 95%; padding: 0 10pt 0 0; float: left; background-color: #eaeaea;">
<b class="whb">Choose a container.</b> There are a variety of inexpensive options available. Germinating flats are cheap and specifically created for the purpose of germinating seeds. Plastic drinking cups and recycled egg cartons are other inexpensive options, however. Small flower pots will also work.
</div>
</div>
【问题讨论】:
-
你也可以试试边框样式?
-
我的第一条评论的补充——学习使用浏览器开发者工具。如果您检查过该元素,您会看到
border-radius和border用于设置该容器的样式。因此,仅出于测试目的,请使用<div style="width: 90%; background-color: #eaeaea; border: 1px solid black; border-radius: 4px;"> -
谢谢,有边界半径就行了!!
标签: html wordpress rounded-corners