H-6ren">
gpt4 book ai didi

css - 有没有办法在 "center-left"上设置这个标题文本?

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

有没有办法将标题文本设置为“center-left”而不是 center 或 left。

提前致谢。

----------------200px---------------->

enter image description here

<!DOCTYPE html>
<html>
<head>
<title>HTML5, CSS3 and JavaScript demo</title>
</head>
<body>

<div style="background-color:red;width:200px;text-align:center"> <!--"text-align: center-left"-->
<div style="">
header
</div>
</div>

</body>
</html>

最佳答案

希望对您有所帮助;

.header{
margin-left:-25%;
}
<!DOCTYPE html>
<html>
<head>
<title>HTML5, CSS3 and JavaScript demo</title>
</head>
<body>

<div style="background-color:red;width:200px;text-align:center"> <!--"text-align: center-left"-->
<div style=""class="header">
header
</div>
</div>

</body>
</html>

关于css - 有没有办法在 "center-left"上设置这个标题文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31342350/

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