responsive code example
Example 1: responsive html
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Example 2: what is responsive design
Example 3: responsive
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
}
@media only screen
and (min-width : 321px) {
}
@media only screen
and (max-width : 320px) {
}
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
}
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) {
}
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
}
@media only screen
and (min-width : 1224px) {
}
@media only screen
and (min-width : 1824px) {
}
@media
only screen and (-webkit-min-device-pixel-ratio : 1.5),
only screen and (min-device-pixel-ratio : 1.5) {
}
Example 4: make it responsive
<div id="gallery">
<div class="showcase-images">
<div class="showcase-block">
<img id="show-img" src="images/showcase/tabs.png" alt="Tabs">
</div>
</div>
<nav>
<ul id="main">
<li id="tabs"><a href="#">Tab</a></li>
<li id="login"><a href="#">Login</a></li>
<li id="forum"><a href="#">Forum</a></li>
</ul>
</nav>
</div>