gpt4 book ai didi

html - 仅使用 CSS 将

中的文本移动到

宽度的末尾

转载 作者:太空宇宙 更新时间:2023-11-03 20:20:31 25 4
gpt4 key购买 nike

我在 <p> 中有一行具有固定宽度的元素,如下所示:

<p class="line">
To be, or not to be,
<span class="variant">that is the question,</span>
<span class="variant right">&nbsp<b>&minus;</b>&nbsp</span>
</p>

我正在尝试移动 &minus; “-”到行的右端,其余文本左对齐。我只需要使用 HTML 和 CSS(最好不是 CSS3)来做这件事,因为我正在制作模型模型。我觉得有办法做到这一点,但我想不出它会是什么。

如有任何帮助,我们将不胜感激。

谢谢。

最佳答案

在你的 CSS 中:

.right{
float:right;
}

关于html - 仅使用 CSS 将 <p> 中的文本移动到 <p> 宽度的末尾,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11543402/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com