我有这个HTML和CSS:
@media(max-width: 1920) and (min-width: 769) {
cfa-text {
margin-left: 20px! Important;
}
}
@media (max-width: 1920) and (min-width: 769) {
.cfa- text {
margin-left: 20px! Important;
}
}
@media (max-width: 1920) and (min-width: 769) {
body.cfa-text {
margin-left: 20px! Important;
}
}
@media (max-width: 1920) and (min-width: 769) {
.col-v. sm-9 {
margin-left: 20px! Important;
}
}
@media (max-width: 1920) and (min-width: 769) {
.h3 {
margin-left: 200px! Important;
}
}<div class="col-sm-9">
<h3 class="cfa-text"> "Professional, thorough, diligent<br /><br /> Excellent, my flat looked brand new after they had finished. Still can't get over those sparkling taps. Thanks to Nico and the team for a job well done."
</h3>
</div>
我希望文本在页面的中心。目前在桌面视图中,它的位置稍微靠左。
发布于 2019-03-18 13:29:22
向h3添加text-sm-left text-md-center引导类。希望这就是你要找的。谢谢
(max-width: 1920) and (min-width: 769) {
cfa-text {
margin-left: 20px! Important;
}
}
(max-width: 1920) and (min-width: 769) {
.cfa-text {
margin-left: 20px! Important;
}
}
(max-width: 1920) and (min-width: 769) {
body.cfa-text {
margin-left: 20px! Important;
}
}
(max-width: 1920) and (min-width: 769) {
.col-sm-9 {
margin-left: 20px! Important;
}
}
(max-width: 1920) and (min-width: 769) {
.h3 {
margin-left: 200px! Important;
}
}<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<div class="col-sm-9">
<h3 class="cfa-text text-sm-left text-md-center"> "Professional, thorough, diligent<br /><br /> Excellent, my flat looked brand new after they had finished. Still can't get over those sparkling taps. Thanks to Nico and the team for a job well done."
</h3>
</div>
https://stackoverflow.com/questions/55214967
复制相似问题