我想要的正好是下面这样的东西: Side by side p-tages

几个可能超过一行的文本,在每个<p></p>标签的末尾有一个形状(圆圈),下一个文本从它的连续部分开始.

我试着 for each 元素设置内联样式,但效果不佳!

/*The div tag is related to the circle shape*/

<p style="display: inline">This is a Lorem ipsum</p>
<div style="display: inline"></div>
<p style="display: inline">dolor sit amet</p>
<div style="display: inline"></div>
<p style="display: inline">elit sed do</p>
<div style="display: inline"></div>
<p style="display: inline">eiusmod tempor incididunt</p>
<div style="display: inline"></div>

推荐答案

您可以使用span将元素放入p中.示例:

<p style="display: inline">
This is a Lorem ipsum <span class="circle"></span>
dolor sit amet <span class="circle"></span>
elit sed do <span class="circle"></span>
eiusmod tempor incididunt <span class="circle"></span>
</p>

在您的css文件中:

.circle {
   background-color:gray;
   height:10px;
   width:10px;
   border-radius:5px;
}

Html相关问答推荐

删除第一个列表项上的左边框

如何在Vim中删除Html标签?

垂直页眉,每行只显示一个使用css的字母

在Chrome中使用手写笔时,滚动条方向反转

页脚与主要内容重叠

当光标悬停在(相同)父元素上方时,为多个子元素创建不同的过渡动画

无法从路径参数获取ID

我怎样才能有一个div,在其中放置一个消息,打破和不go 的div?

更改Angular 为17的material Select 字段的高度?

带有图标和悬停过渡的CSS按钮

静态DIV的标签,显示从窗体输入的值

如何检测输入字段是否没有必填且没有占位符?

如何创建淡出研磨背景

CSS 字母间距将按钮向右扩展

输入框不是全宽

我无法设置使用 Tailwind CSS 创建的仪表板的网格 struct

我正在使用 react-router-dom 并创建了一个固定的导航栏,它在每个网页上不断改变大小,我不知道为什么

如何将第一个 p 标签放在其下方第二个 p 标签的中间

如何自定义具有白色透明背景的光标图像?

如何在锚点可点击的伪元素周围制作空白?