卡住。我如何居中并置于这三个文本?
试图离开,中间,右侧3片?试图使用CSS,我卡住了。
谢谢。
Trying to left, center, right the 3 pieces of text? Trying to use CSS and I'm stuck.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用Flex并将其设置为合理的空间之间
you could use flex and set justify-content to space-between
您可以使用Flex属性来解决此问题。您将拥有一个父母Div,其中包含所有三个孩子的物品。根据您的HTML代码中项目的位置,内容将证明其相应的方面是合理的。因此,如果它是第一个,则将是合理的。如果是第二个,它将是合理的。如果是第三个,它将是合理的。这是您将如何做的;
You could use the flex property to solve this. You would have a parent div which contains all 3 of your children items. Depending on where the item is in your HTML code, the content will justify to its respective side. So if it's the first, it will be justified to the left. If it's the second, it will be justified to the middle. And if it's the third, it will be justified to the right. Here is how you would do it;
我同意其他回应。在
。想要将父div设置为
display:flex
并根据您想做的事情,您可以设置Jusify-content:flex-start
左,合理性:flex-end
正确,并且合理性:中心
到中心。I agree with the other responses. Check out this really helpful/visual website on flexboxes
You want to set the parent div as
display: flex
and depending on what you want to do, you can setjustify-content: flex-start
for left,justify-content: flex-end
to right, andjustify-content: center
to center.