更改移动设备的网站

时间:2014-08-28 09:53:43

标签: html css mobile media-queries

我有网站,我想将风格改为移动友好(大按钮,大文本字段等)。我怎样才能做到这一点? html文件:

<link href="jquery-ui/css/south-street/jquery-ui-1.10.4.custom.css" rel="stylesheet" media="screen">

和css文件:

@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1366px)  {

 .name { margin-left:auto; margin-right:auto; color:#369; font-size:50px; text-align:right; width:600px;}

}

网站在平板电脑和平板电脑上看起来没有任何反应

1 个答案:

答案 0 :(得分:0)

您必须知道要为其创建单独样式的设备的确切像素尺寸。将样式放到合适的范围内。

我发现的最好的页面是CSS Tricks,它列出了CSS中使用的所有最常见的媒体查询。我想你会在那里找到你需要的一切! :)

http://css-tricks.com/snippets/css/media-queries-for-standard-devices/

相关问题