我在博客网站上使用自定义CSS。当CSS只关注一个帖子时,我在帖子中使用CSS代码。例如,我用它来将诗歌的线条与图形背景对齐。由于我使用Chromium(在Linux Mint 18.1中),我使用此浏览器来检查结果。但是,当我在Firefox中查看相同的已发布帖子时,CSS对齐已关闭。
编辑:检查Opera也是如此,表现与Firefox相同(即Firefox和Opera以相同的方式呈现文本,但与Chrome / Chromium不同)。
安装了两个(或更多)浏览器的任何人都可以check out the post。
整个邮政编码如下:
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: center;" trbidi="on">
<div class="image">
<br /></div>
<div class="image">
<a href="http://tsairi.deviantart.com/art/The-Birds-437529362" target="_blank"><img alt="the birds by tsairi final day poem by mozzribo" height="1808" src="https://i.imgur.com/hC2zfVe.png" title="The Birds by Tsairi − click for image source" width="434" /></a>
<br />
<div class="text">
<span style="color: white;">
A seraph approached me last night<br />
Gave me a burning letter and flew away blazing<br />
As I broke the wax stamp a black phoenix fluttered before me<br />
It took me to the fractal spiral and shattered my body<br />
And with it all of my self-proclaimed sins<br />
The eternity that is to be was one and I was told that<br />
There is nothing to regret and there will never be<br />
If I should go through this scabrous wildwood again<br />
I would, just to live again that night when we met at the cemetery<br />
The bird sent me back to believe that there is nothing to regret<br />
Aye, there is nothing to regret<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
When the time comes for gentlemen Their ethics to deprave<br />
I’ll be standing in front of my children’s grave<br />
I’ll be asking with a brain gone illogically brave<br />
Where is my promised final day<br />
That has been taken from the grievous away<br />
Who will kindly grant it to me<br />
Where are the pages of Genesis Lost<br />
And who will pay the cost<br />
Where is my promised final day<br />
That has been taken from the grievous away<br />
Who will kindly grant it to me<br />
Where are the pages of Genesis Lost<br />
And who will pay the cost<br />
Better than my noose in the company of I to be tossed<br />
I to be tossed<br />
Who will kindly stand in front of me and say<br />
"There is still a cigarette to finish in the ashtray."<br />
</span>
</div>
</div>
</div>
<style>
.image {
position:relative;
float:center; /* optional */
}
.image .text {
position:absolute;
color: black;
text-shadow: 0px 0px 5px rgba(0, 0, 0, 1);
font-size: 11pt;
top:10px; /* in conjunction with left property, decides the text position */
margin-top:650px;
left:39px;
width:783px; /* optional, though better have one */
}
</style><br /></div>
我在以下答案中找到了导致此问题的原因: https://webmasters.stackexchange.com/questions/14324/font-displays-differently-in-firefox-vs-chrome/14347#14347
但我不知道这是否可以解决。有没有办法强制浏览器像另一个一样呈现文本?
关于如何让CSS在所有浏览器中表现相同的任何建议?
答案 0 :(得分:-1)
首先清理您的浏览器缓存并更新浏览器我检查您的链接它在两个浏览器chrome和firefox都很好。为什么你一遍又一遍地使用这些br标签只需应用margin-top和你的好处