media in the link element -CSS and select by #id
2015-05-02 12:03
330 查看
<span style="font-size:18px;color:#000066;"><strong><em>ADD media queries into HTML</em></strong></span>
<span style="font-size:14px;"> </span>
<span style="font-size:14px;"><link href="lounge-mobile.css" rel="stylesheet"<strong><em><span style="color:#ff0000;"> </span><span style="color:#000066;">media="screen and (max-device-width: 480px)"></span></em></strong></span>
<span style="font-size:14px;"><link href="lounge-print.css" rel="stylesheet"<strong><em><span style="color:#ff0000;"> </span><span style="color:#000066;">media="print"></span></em></strong></span>
ADD media queries right into CSS
@media screen and (min-device-width:481px) {
#guarantee {
margin-right :250px;
}
}
@media screen and (max-device-width:180px) {
#guarantee {
margin-right : 30px;
}
}
@media print {
body {
font-family: Times, serif;}
}
}
p.specials { /* All other rules apply to all pages because they aren’t contained within a @media rule. */
color: red;
}
if you put all your rules in one file and split them up using @media rules, your CSS could get pretty big. By using different <link> elements for different media types, you can keep your CSS organized in different files depending on the media type.
So, if your CSS files are fairly large, we recommend sing <link> elements to specify different stylesheets
select id using CSS
Use multiple stylesheets in HTML
Order Matters!
相关文章推荐
- How to Change the DBID and the DBNAME by using NID [ID 224266.1]
- MySQL: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sss
- Docker安装MySQL遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题
- Description of the default C and C++ libraries that a program will link with when built by using Vis
- how websites are perceived by their visitors and the basic ways in which websites can be constructed.
- linux上,mysql使用聚合函数group by 时报错:SELECT list is not in GROUP BY clause and contains nonaggre的问题
- Error Code: 1055. Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated
- How to Change the DBID and the DBNAME by using NID [ID 224266.1]
- java 提示----This element has no attached source and the Javadoc could not be found in the attached Javadoc
- #1055 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this i
- Mobile Java Eyed by Big Media Companies in the UK @ JDJ
- Docker安装MySQL遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题
- it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping>
- Post Json Data by Ajax, and Parse the Json Data in backend
- Mysql解决SELECT list is not in GROUP BY clause and contains nonaggregated column 问题
- mysql遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题
- How to Change the DBID and the DBNAME by using NID [ID 224266.1]
- How to Change the DBID and the DBNAME by using NID [ID 224266.1]
- Note: This element has no attached Javadoc and the Javadoc could not be found in the attached source
- walk around by The provided App differs from another App with the same version and product ID