但它会使所有面-6ren">
gpt4 book ai didi

css - 如何在页面中心的许多面板中仅对齐两个面板的分组文本?

转载 作者:太空宇宙 更新时间:2023-11-04 08:51:47 24 4
gpt4 key购买 nike

在我的页面中有许多面板和分组文本。对于两个面板,分组文本必须居中对齐。我试过:

legend {
margin:0 auto;

<asp:Panel ID="Panel13" runat="server" GroupingText="<b>Grouping Text</b>">
<table>
<tr></tr>
</table>
</asp:Panel>

但它会使所有面板的文本分组居中。我只需要将分组文本中心对齐到两个面板。请帮助我。

最佳答案

为您希望文本居中对齐的面板指定特定类。检查下面的示例。

legend.align-centre {
text-align: center;
color: red;
}

legend {
font-size: 16px;
padding: 15px 0;
}
<!DOCTYPE html>
<html>
<head>
<title></title>

</head>
<body>
<legend class="align-centre">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type speci</legend>

<legend>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type speci</legend>

<legend>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type speci</legend>

<legend>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type speci</legend>
</body>
</html>

希望对您有所帮助。

关于css - 如何在页面中心的许多面板中仅对齐两个面板的分组文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43390283/

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