Hallo Freunde testen nur Reaktionsfähigkeit meiner Website.Test der abschirmenden Bildschirme | Twitter Bootstrap
Also habe ich einen grundlegenden Code gemacht, in der Hoffnung, Titel in den Seiten werden für unterschiedliche Bildschirmgröße reagiert werden.
hier ist der HTML-Code,
<!-- Custom styles for this template -->
<link rel="stylesheet" type="text/css" href="style.css">
<title>Testing Responsive Screens</title>
</head>
<body>
<div class='divHeader'><!-- Contact Us title Start -->
<div class="container"><!--container-->
<div class="row"><!-- Contact Us title -->
<!-- LARGE SCREEN TITLE -->
<div class='LGS'>
<div class='col-lg-4'></div>
<div class='col-lg-4 divHeaderContent text-center'>
<h1><br>Contact Us</h1>
</div>
<div class='col-lg-4'></div>
</div>
<!-- MEDIUM SCREEN TITLE -->
<div class='MDS'>
<div class='col-md-4'></div>
<div class='col-md-4 divHeaderContent text-center'>
<h2><br>Contact Us</h2>
</div>
<div class='col-md-4'></div>
</div>
<!-- SMALL SCREEN TITLE -->
<div class='SMS'>
<div class='col-sm-4'></div>
<div class='col-sm-4 divHeaderContent text-center'>
<h3><br>Contact Us</h3>
</div>
<div class='col-sm-4'></div>
</div>
<!-- EXTRA SMALL 1 SCREEN TITLE -->
<div class="XSS1">
<div class='col-xs-4'></div>
<div class='col-xs-4 divHeaderContent text-center'>
<h4><br>Contact Us</h4>
</div>
<div class='col-xs-4'></div>
</div>
<!-- EXTRA SMALL 2 SCREEN TITLE -->
<div class="XSS2">
<div class='col-xs-4'></div>
<div class='col-xs-4 divHeaderContent text-center'>
<h6><br>Contact Us</h6>
</div>
<div class='col-xs-4'></div>
</div>
</div><!-- End of Contact Us title -->
</div><!--End of container-->
</div>
</body>
</html>
& die einfache CSS,
@media (min-width: 1200px) {
/* ================== GENERAL RULE ===================== */
.MDS, .SMS, .XSS1, .XSS2{
display: none;
}
}
/* Landscape tablets and medium desktops */
@media (min-width: 992px) and (max-width: 1199px) {
/* ================== GENERAL RULE ===================== */
.LGS, .SMS, .XSS1, .XSS2{
display: none;
}
}
/* Portrait tablets and small desktops */
@media (min-width: 768px) and (max-width: 991px) {
/* ================== GENERAL RULE ===================== */
.LGS, .MDS, .XSS1, .XSS2{
display: none;
}
}
/* Landscape phones and portrait tablets */
@media (max-width: 767px) {
/* ================== GENERAL RULE ===================== */
.LGS, .MDS, .SMS, .XSS2{
display: none;
}
}
/* Portrait phones and smaller */
@media (max-width: 480px) {
/* ================== GENERAL RULE ===================== */
.LGS, .MDS, .SMS, .XSS1{
display: none;
}
}
Klassen gewidmet sind jeder Größe Typ Bildschirm.
Problem tritt in der kleinsten Bildschirmgröße auf. Der Titel erscheint einfach nicht. Hilf mir Leute, lass mich wissen, ich gehe falsch.
Danke!
danke Kumpel, das hat funktioniert !! – Gaurav
Gern geschehen :) – wander