Steps:
1. In your basic theme for desktop browsers, See each element of web page and think for tablet and mobile view. You can use notebook pen for complex layout.2. Change element dimension from pixel value to percentage value and make some additional changes to make it similar on same environment.
3. Use Meta tag to disable default mobile scaling to display web page fit on screen.
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
<!--[if lt IE 9]> <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script><![endif]--> |
@media screen and (min-width : 750px) {#content{float:left;width:60%;}#sidebar{float:right;width:35%}} @media screen and (min-width : 481px) and (max-width : 749px) {#content{width:95%;}#sidebar{width:95%;} } |
<link rel="stylesheet" type="text/css" media="only screen and (max-device-width: 480px)" href="small-device.css" /> |
img { max-width: 100%;}iframe, object, embed{width: 100%;} |
These are the basic steps to implement responsive web design. Alternatively, CSS Frameworks like Less Framework 4, MQFramework, Foundation, Skeleton..etc are used for rapid development.
link website: http://techbrij.com/responsive-design-make-website-mobile-tablet-compatible
http://webdesignmaz.com/2013/10/html-responsive-website-templates.html
Không có nhận xét nào:
Đăng nhận xét