2013-07-04 51 views
0

我正在使用bootstrap,我遇到了一个问题,我必须将一个样式硬编码到一个页面才能使div正常工作。当我在外部创建选择器时,即使使用html和body选择器也不会响应。最好的方法和遇到覆盖引导CSS的问题

我的手机查看代码覆盖

@media (max-width: 480px) { 

html body.index { padding-bottom: 0px; color: #000; background-img: none; } 

html body object { display: none; } 
body div.fuller { display: none; } 
footer { display: none; } 
body .melt { margin: 0px; padding: 0px; border: solid 5px #000; } 
iframe { margin-left: 0px; width: 560px; } 
html body .retro { width: 480px; margin: 0px; overflow: hidden; } 
} 

我创建了一些媒体覆盖,但其中一人是无法正常工作,因为内联样式。当我将它添加到我的.css文件中时,为什么它不起作用?此外,这是你们为移动设备编码的方式吗?这对我来说是新的,我愿意以任何方式解决这个问题。

欢迎任何建议。

http://galnova.com是我的网站

回答

1

你可以试试这个

<link rel="stylesheet" type="text/css" href="screen.css" media="screen" /> 
<link rel="stylesheet" type="text/css" href="handheld.css" media="handheld" /> 

@media handheld { 

html body.index { padding-bottom: 0px; color: #000; background-img: none; } 

html body object { display: none; } 
body div.fuller { display: none; } 
footer { display: none; } 
body .melt { margin: 0px; padding: 0px; border: solid 5px #000; } 
iframe { margin-left: 0px; width: 560px; } 
html body .retro { width: 480px; margin: 0px; overflow: hidden; } 
} 

@media only screen and (max-device-width: 480px) { ... }  

@media handheld and (min-width: 20em) { ... } /* WIDTH */ 
@media screen and (max-height: 700px) { ... } /* HEIGHT */ 
@media screen and (device-width: 800px) { ... } /* DEVICE-WIDTH */ 
@media screen and (device-height: 400px) { ... } /* DEVICE-HEIGHT */ 
0

关于.retro造型,有一个在你的CSS一个错字

gain.css的1229行,你有

htmlbody .retro { width: 480px; margin: 0px; overflow: hidden; } 

... html和身体

之间缺少空间希望这可以帮助!