有時我遇到這個問題,其中來自更高一行CSS文件鏈接的CSS規則覆蓋CSS文件鏈接較低行的CSS規則。CSS鏈接順序和違規
讓我證實,這是加載文件的順序:我補充一個規則這樣
<link href="css/bootstrap.min.css" type="text/css" rel="stylesheet">
<link href="css/font-awesome.min.css" type="text/css" rel="stylesheet">
<link href="css/datepicker.css" type="text/css" rel="stylesheet">
<link href="css/fonts.css" type="text/css" rel="stylesheet">
<link href="css/bootstrapValidator.min.css" type="text/css" rel="stylesheet">
<link href="css/bootstrap-select.css" type="text/css" rel="stylesheet">
<link href="css/styles.css" type="text/css" rel="stylesheet">
<link href="css/media_queries.css" type="text/css" rel="stylesheet">
<link href="css/hover.min.css" type="text/css" rel="stylesheet">
<link href="css/print.css" type="text/css" rel="stylesheet" media="print">
在我styles.css
文件:
dd {
margin-left: 0;
}
所以,我從這個唯一的結論是一般風格不要否決媒體查詢。這是真的?推翻這種引導式媒體查詢的最佳做法是什麼?通過編寫相同的查詢或使用!important
?
感謝
我看到丹尼爾,非常感謝你的快速反應和參考。 – odedta