我的頁腳背景只是消失在768px和它打破了所有的造型由於我的頭碼這個媒體查詢:衝突的CSS頁眉/頁腳
[type="checkbox"], label {
display: none;
}
@media screen and (max-width: 768px) {
nav ul {
display: none;
}
我怎樣才能解決這個問題呢? 我嘗試使用多個瀏覽器,頁腳只能在小於768px的範圍內工作。
/* ----------------------------- Footer ------------------------------ */
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,300);
footer { background-color:#0c1a1e; min-height:350px; font-family: 'Open Sans', sans-serif; }
.footerleft { margin-top:50px; padding:0 36px; }
.logofooter { margin-bottom:10px; font-size:25px; color:#fff; font-weight:700;}
.footerleft p { color:#fff; font-size:12px !important; font-family: 'Open Sans', sans-serif; margin-bottom:15px;}
.footerleft p i { width:20px; color:#999;}
.paddingtop-bottom { margin-top:50px;}
.footer-ul { list-style-type:none; padding-left:0px; margin-left:2px;}
.footer-ul li { line-height:29px; font-size:12px;}
.footer-ul li a { color:#a0a3a4; transition: color 0.2s linear 0s, background 0.2s linear 0s; }
.footer-ul i { margin-right:10px;}
.footer-ul li a:hover {transition: color 0.2s linear 0s, background 0.2s linear 0s; color:#ff670f; }
.social:hover {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-o-transform: scale(1.1);
}
.icon-ul { list-style-type:none !important; margin:0px; padding:0px;}
.icon-ul li { line-height:75px; width:100%; float:left;}
.icon { float:left; margin-right:5px;}
.copyright { min-height:40px; background-color:#000000;}
.copyright p { text-align:left; color:#FFF; padding:10px 0; margin-bottom:0px;}
.heading7 { font-size:21px; font-weight:700; color:#d9d6d6; margin-bottom:22px;}
.post p { font-size:12px; color:#FFF; line-height:20px;}
.post p span { display:block; color:#8f8f8f;}
.bottom_ul { list-style-type:none; float:right; margin-bottom:0px;}
.bottom_ul li { float:left; line-height:40px;}
.bottom_ul li:after { content:"/"; color:#FFF; margin-right:8px; margin-left:8px;}
.bottom_ul li a { color:#FFF; font-size:12px;}
我用瓶的後端,所以這裏是我的html與神社模板塊:
<header>
<div class="inner">
<nav>
<a href="{{ url_for('home_page') }}" class="logo">My App Logo.</a>
<input type="checkbox" id="nav" /><label for="nav"></label>
<ul>
<li><a href="{{ url_for('home_page') }}">Home</a></li>
<li><a href="{{ url_for('user_page') }}">Dashboard</a></li>
<li><a href="{{ url_for('trends') }}">Trends</a></li>
<li><a href="{{ url_for('pricing') }}">Pricing</a></li>
{% if current_user.is_authenticated %}
<li><a href="{{ url_for('user_profile_page') }}">
{{ current_user.first_name or current_user.user_auth.username }}</a></li>
<li><a href="{{ url_for('user.logout') }}">Sign out</a></li>
{% else %}
<li><a href="{{ url_for('user.login') }}">Sign in</a></li>
{% endif %}
</ul>
</nav>
</div>
</header>
<body>
{% block body %}
<footer>
{% block footer %}
<div class="pull-left"><a href="#">Privacy Policy</a> | <a href="#">Terms Of Service</a></div>
<div class="pull-right">© 2017 All rights reserved.</div>
<div class="container">
<div class="row">
<div class="col-md-4 col-sm-6 footerleft ">
<div class="logofooter"> Logo</div>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley.</p>
<p><i class="fa fa-map-pin"></i> 254, Fake Adress, California</p>
<p><i class="fa fa-phone"></i> Phone (India) : +54 6846 887</p>
<p><i class="fa fa-envelope"></i> E-mail : [email protected]</p>
</div>
<div class="col-md-2 col-sm-6 paddingtop-bottom">
<h6 class="heading7">GENERAL LINKS</h6>
<ul class="footer-ul">
<li><a href="#"> Career</a></li>
<li><a href="#"> Privacy Policy</a></li>
<li><a href="#"> Terms & Conditions</a></li>
<li><a href="#"> Client Gateway</a></li>
<li><a href="#"> Ranking</a></li>
<li><a href="#"> Case Studies</a></li>
<li><a href="#"> Frequently Ask Questions</a></li>
</ul>
</div>
<div class="col-md-3 col-sm-6 paddingtop-bottom">
<h6 class="heading7">LATEST POST</h6>
<div class="post">
<p>facebook crack the movie advertisment code:what it means for you <span>August 3,2015</span></p>
<p>facebook crack the movie advertisment code:what it means for you <span>August 3,2015</span></p>
<p>facebook crack the movie advertisment code:what it means for you <span>August 3,2015</span></p>
</div>
</div>
<div class="col-md-3 col-sm-6 paddingtop-bottom">
<div class="fb-page" data-href="https://www.facebook.com/facebook" data-tabs="timeline" data-height="300" data-small-header="false" style="margin-bottom:15px;" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true">
<div class="fb-xfbml-parse-ignore">
<blockquote cite="https://www.facebook.com/facebook"><a href="https://www.facebook.com/facebook">Facebook</a></blockquote>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
</footer>
<div class="copyright">
<div class="container">
<div class="col-md-6">
<p>© 2016 - All Rights with Webenlance</p>
</div>
<div class="col-md-6">
<ul class="bottom_ul">
<li><a href="#">Lorem</a></li>
<li><a href="#">About us</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Faq's</a></li>
<li><a href="#">Contact us</a></li>
<li><a href="#">Site Map</a></li>
</ul>
</div>
</div>
</div>
你能告訴我們你的HTML的示意圖。 ***不要***所有的,只是結構方面,我們需要知道你是什麼問題。 – Martin
很難說沒有看到標記,但是你可能需要更具體的目標頭部'nav',因爲你的頁腳中可能有另外一個'nav'元素正在從媒體查詢中消失。 – trevorp