2016-08-12 25 views
0

我有媒體查詢,但由於某種原因某個特定的類不起作用。我爲此使用Bootstrap模態。我會需要這個在420寬度最好的工作。媒體查詢不在Bootstrap中與某些類一起工作,但與其他類一起使用

這裏是我的CSS代碼:

@media (min-width: 768px) { 
    .caracs{ 
    width: 500px !important; 
    font-family: 'Poppins', sans-serif; 
    } 
    .panel{ 
    text-align: center; 
    height: 255px; 
    } 
    .nombre-datos{ 
     display: inline-block; 
     font-size: 0.8em; 
     text-align: justify; 
    } 
} 
@media (min-width: 992px) { 
    .caracs{ 
     width: 810px !important; 
     font-family: 'Poppins', sans-serif; 
    } 
    .nombre-datos{ 
     display: inline-block; 
     font-size: 0.8em; 
     text-align: justify; 
    } 

} 
@media (min-width: 1200px) { 
    .caracs{ 
    width: 810px !important; 
    font-family: 'Poppins', sans-serif; 
    } 
    .panel{ 
     text-align: center; 
     height: 165px; 
    } 
} 

我特別需要:

.nombre-datos{ 
    display: inline-block; /*Necesario para que los divs estén en el mismo renglón*/ 
    width: 250px !important; 
    font-size: 0.8em; 
    text-align: justify; 
} 

要改變。我想在小屏幕上刪除寬度:250px!重要的屬性,當我在瀏覽器中調整窗口大小時,它根本不起作用。

下面是一些圖片:

這是它的外觀在普通屏幕視圖:

enter image description here

下面是它的外觀響應於小型設備:

enter image description here

這裏是我希望它看起來,刪除指定的屬性(我也使用Firefox inspector/dev LS將其刪除):

enter image description here

這是怎麼回事?

+1

刪除!那麼重要媒體查詢 –

+0

@HeadInCloud定義你的意思是從類中刪除**外**查詢?或兩者?如果你的意思是在外面,我已經做到了,但仍然無效。 – dawn

+0

您是否嘗試過在瀏覽器開發工具中編輯css以查看它是否以此方式工作? – kemosabe

回答

0

岡井,我不能完全肯定發生了什麼事,但這樣做:

意義,改變了查詢從分鐘最大和強迫與重要一些東西的伎倆沒有!搞亂別的東西。

@media (max-width: 992px) { 
    .caracs{ 
     /*width: 810px !important;*/ 
     font-family: 'Poppins', sans-serif; 
    } 
    .nombre-datos{ 
     width: 364px !important; 
     display: inline-block; 
     font-size: 0.8em; 
     text-align: justify; 
    } 
} 
相關問題