我正在使用以下 CSS 代码在我的网站上显示 Flash 文本。 Flash 文本在 Chrome 浏览器中显示良好,但在 Mozilla Firefox 浏览器中显示不佳。如果我添加此代码 width:650px;position:absolute;在 css 中,在 mozilla firebos 中可以很好地显示 flash 文本,但不能再次在 chrome 浏览器中显示。我该怎么办??
.flash_text { padding-left: 50px;左边距:50px;
Chrome 浏览器
快讯:人格发展培训计划
Mozilla 浏览器
快讯:
Training Programme on Personality Development
如何在两个浏览器中正确显示
下面的 CSS 代码在 chrome 浏览器上运行良好
.flash_text { padding-left: 50px;左边距:50px;
但不适用于 Mozilla 浏览器
如果我添加此编码 width:650px; position: absolute; 显示很好,但 chrome 浏览器再次显示不正确 怎么办??
最佳答案
<html>
<head>
<style type="text/css">
@-moz-document url-prefix() {
h1 {
color: red;
}
}
</style>
</head>
<body>
<h1>This should be red in FF</h1>
</body>
</html>
所有 3 个浏览器
<style type='text/css'>
/*This will work for chrome */
#categoryBackNextButtons
{
width:490px;
}
/*This will work for firefox*/
@-moz-document url-prefix() {
#categoryBackNextButtons{
width:486px;
}
}
</style>
<!--[if IE]>
<style type='text/css'>
/*This will work for IE*/
#categoryBackNextButtons
{
width:486px;
}
</style>
<![endif]-->
关于css - 如何为 Mozilla Firefox 浏览器编写 CSS 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23053270/