HTML 5和CSS样式更改一旦屏幕尺寸 [英] HTML 5 and CSS Style Change Upon Screen Size
问题描述
很抱歉,如果这个职位是太多问题,但在网页设计,因为我软弱,但我想在我的网站做这些效果,可能你小子请让我知道如何做到这一点?
Sorry if this post is too many of question, but because i weak in web design but i want to do these effect in my website, could you guy please let me know on how to do it ?
首先...请访问此站点
http://net.tutsplus.com/
First...Please visit this site http://net.tutsplus.com/
问1:可以,我知道我怎么可以在ASP中的MVC 3调整的影响?
当我们的网站超过1280x800的有一个侧边栏用户的屏幕尺寸更小,它会显示侧边栏的单个列。当用户的屏幕尺寸超过1280x800的大,它会显示侧边栏的两栏。
Question 1 : May i know how could i do the effect of resizing in Asp MVC 3 ? when our site got a sidebar user screen size less than 1280x800, it will display single column of sidebar. When user screen size larger than 1280x800, it will display two column of sidebar.
问题2:当屏幕尺寸太小,网站的左侧会显示只有大约保证金的20像素。所有图像和背景将隐藏。确切就像当你重新大小的浏览器打开时,现场NETTUTS
Question 2 : when the screen size is too small, left side of site will display only about 20px of margin. All the image and background will hidden. exact like when you re-size your browser when opening nettuts site.
推荐答案
对于它正在对与CSS媒体查询显示的视口的大小来调整页面布局的最好方法。在你做任何事情,请阅读本:
The best way to adjust the layout of a page with respect to the size of the viewport that it is being displayed on is with CSS Media queries. Before you do anything, read this:
<一个href=\"http://www.alistapart.com/articles/responsive-web-design/\">http://www.alistapart.com/articles/responsive-web-design/
这实际上是关于这一主题的圣经。
It's practically the bible on the subject.
之后,给规范读:
http://www.w3.org/TR/css3-mediaqueries/
越少CSS框架附带一套有用的媒体查询,是我作为一个非常简单的框架是:
The less CSS framework comes with a set of useful media queries and is something I use as a very simple framework:
这篇关于HTML 5和CSS样式更改一旦屏幕尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!