简体   繁体   English

如何将CSS设置为移动网站

[英]how set css to mobile site

What style settings I need to set for webpage custom mobile browsing What setting I need to give pages What are settings I need to set the input boxes , buttons or select item ? 我需要为网页自定义移动浏览设置哪些样式设置?我需要给页面设置什么设置?需要设置输入框,按钮或选择项的设置是什么?

Should I set size in percentage or unit side? 我应该以百分比或单位面来设置尺寸吗?

For mobile web, there are few aspects to be understood. 对于移动Web,几乎没有什么方面可以理解。

1) use viewport to set size of website on device for example, 1)例如,使用viewport在设备上设置网站的大小,

<meta name="viewport" content="width=device-width" />

will set size of website according to size of device. 将根据设备的大小来设置网站的大小。

2) make pages short and sweet, Less yet effective content. 2)使网页简短而甜美,但内容不够有效。

3) Use media queries to adjust content. 3)使用媒体查询来调整内容。

4) Your designing should be responsive. 4)您的设计应具有响应能力。 Use percent and em values rather than fixed pixel values. 使用百分比和em值,而不要使用固定像素值。

Here are few links for more information. 以下是更多信息的链接。

http://designshack.net/articles/css/quick-tips-for-creating-a-mobile-optimized-site/ http://designshack.net/articles/css/quick-tips-for-creating-a-mobile-optimized-site/

http://designshack.net/articles/css/quick-tips-for-creating-a-mobile-optimized-site/ http://designshack.net/articles/css/quick-tips-for-creating-a-mobile-optimized-site/

https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag

If your asking about a responsive flow you want percentage. 如果您询问响应流,则需要百分比。 However it's more complicated. 但是,它更加复杂。 Maybe start reading here. 也许从这里开始阅读。 http://jquerymobile.com/demos/1.3.0-beta.1/docs/demos/grids/rwd-basics.html http://jquerymobile.com/demos/1.3.0-beta.1/docs/demos/grids/rwd-basics.html

Not pushing jquery mobile, but it's a good starting place. 不推动jQuery移动,但这是一个很好的起点。

Your question isn't clear but from what you have written, I presume you are looking for Responsive Websites.You can have a look at http://getbootstrap.com/ . 您的问题尚不清楚,但是根据您的书面判断,我想您正在寻找响应式网站。您可以访问http://getbootstrap.com/ Responsive Web design allows for a website to be properly viewed from Mobile and other devices. 响应式Web设计允许从Mobile和其他设备正确浏览网站。

Also have a look at CSS media queries ( @media ). 还可以查看CSS媒体查询( @media )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM