我遇到了一个奇怪的问题。无论我如何修改 CSS 样式中的 .blurb
,在屏幕上都没有任何改变。我已经在三个浏览器(FF、Chrome、Safari)中清除了缓存,但似乎对实际网站没有任何改变。
我想让.blurb
在容器中居中,这样无论文本内容是什么,其左右两侧都会有相同的空间。
目前,我正在使用以下代码:
.blurb {
padding-bottom: 100px;
padding-top: 100px;
margin: 0 auto;
}
.blurb p {
font-family: alexandria;
font-size: 193%;
font-weight: normal;
line-height: 1.5;
}
<div class="blurb">
<p style="text-decoration:underline;color:#f20000;"><span style="color:#282828;">You look like you could use a massage.<br />BodywoRx is here to help.</span></p>
</div><!-- end blurb -->
为了消除一些混淆,我有两个相关的问题。
1. 无论我如何清除缓存、更换浏览器等,我都看不到CSS所做的实时更改。
2. 我需要看到的变化是将.blurb居中在容器内,这样无论文本内容如何,它的右侧和左侧都会有相等的空间。
div.blurb
已经居中对齐(其宽度为700px)(在Chrome中尝试使用开发人员工具进行检查)。要居中文本,请使用text-align: center
,例如“希望我有所帮助”。 - Alvin Wongcolor:red
吗? - Alvin Wong