我在某個菜單按鈕下有一行,我想改變這六行,因爲當你在移動設備上查看它時,該行比菜單更遠。在這一點上,即使我設置大小爲1px它沒有在所有不能改變圖像大小
HTML代碼
<div class="container">
<div class="row">
<div class = "col-sm-12 col-xs-12" style= "background-color:white">
<!--<img src ="/frontimages/orange_tab_wide_up.jpg" style= "display:inline-block">
<img style="margin-left:-4px; display:inline-block" src ="/frontimages/blue_tab_wide.jpg">
<img style="margin-left:-4px; display:inline-block" src ="/frontimages/green_tab_wide.jpg">
<img style="margin-left:-4px; display:inline-block" src ="/frontimages/yellow_tab_wide.jpg">-->
<a class="btn-test btn" type="button" id="search" value="" onclick="check()" href="#" role="button">Search</a><a class="btn-test2 btn" type="button" id="search" value="" onclick="check()" href="#" role="button">Search</a><a class="btn-test3 btn" type="button" id="search" value="" onclick="check()" href="#" role="button">Search</a><a class="btn-test4 btn" type="button" id="search" value="" onclick="check()" href="#" role="button">Search</a>
</div>
</div>
<div class="row">
<div class ="col-xs-7 ">
<!-- <img class="img-responsive" src="/frontimages/orange_line_wide.png">-->
<div class="g"> </div>
</div>
</div>
</div>
CSS
.g {
height:3px;
margin-top:-3px;
background:-moz-linear-gradient(left, #FFFFFF 0%,#28ACEE 50%,#FFFFFF 100%);
background:-webkit-linear-gradient(left, #FFFFFF 0%,#28ACEE 50%,#FFFFFF 100%);
background:linear-gradient(left, #FFFFFF 0%,#EC9B3F 50%,#FFFFFF 100%);
width:100%;
display:block;
}
@media (min-width: 300px) and (max-width: 350px) {
.g {width:1px;}
}
@media (max-width:700px) {
.g{width: 405px}
}
你能提供一些快照或小提琴嗎? –
http://jsfiddle.net/3Vxxb/這裏應該是一個藍色漸變線,菜單下我不知道它爲什麼沒有出現。該線路經過菜單,我正在嘗試解決該問題,以便在移動橫向視圖和縱向視圖上正常工作 – user3638530