小编Tom*_*zko的帖子

媒体查询以横向模式区分桌面和iPad

我正在建立一个响应式设计的网站.我需要区分横向模式下的平板电脑和带有媒体查询的桌面之间的布局.这些是媒体查询:

<link href="base.css" rel="stylesheet"/>
<link href="desktop.css" 
media="only screen and (min-width: 801px)" rel="stylesheet"/>
<link href="tablet.css" 
media="only screen and (min-width: 629px) and (max-width: 800px) and 
(orientation:portrait), 
only screen and (min-height:629px) and (max-height:800px) and 
(orientation:landscape)" rel="stylesheet"/>
Run Code Online (Sandbox Code Playgroud)

desktop.css在横向模式下,平板电脑包含问题.iPad在风景中很1024px广泛,这是PC的常见解决方案.如何通过媒体查询将1000px横向模式中的宽dekstop与平板电脑区分开来?

PS我必须使用媒体查询,因为网站将被缓存/ CDNed等.任何服务器端检测都不起作用.

PS2.

<link href="desktop.css" 
media="only screen and (min-width: 801px), 
not only screen and (min-height:629px) and (max-height:800px) and 
(orientation:landscape)" rel="stylesheet"/>
Run Code Online (Sandbox Code Playgroud)

没有解决问题.

css3 media-queries

7
推荐指数
1
解决办法
9277
查看次数

简单的正则表达式 - 双引号之间用下划线替换空格并使所有字母小写

你能帮我用正则表达式来改变行吗

<string name="Final time">Final time</string>
<string name="After extra time">After extra time</string>
Run Code Online (Sandbox Code Playgroud)

到行

<string name="final_time">Final time</string>
<string name="after_extra_time">After extra time</string>
Run Code Online (Sandbox Code Playgroud)

因此,双引号之间用下划线替换空格并使所有字母小写。

我将在 VIM 中使用这个正则表达式进行搜索/替换。

regex vim

3
推荐指数
1
解决办法
2947
查看次数

标签 统计

css3 ×1

media-queries ×1

regex ×1

vim ×1