如何添加媒体查询?

时间:2014-02-04 18:01:58

标签: html css media-queries

我有一个网站 我正在使用CSS重置它适用于大尺寸显示器的工作 但它不适用于某些显示器和手机 这是网站 我想知道我添加了哪些媒体查询以及如何在我的网站中添加它们 非常感谢。

这是CSS重置

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}

我希望有人帮助我勇士;)

1 个答案:

答案 0 :(得分:0)

这是一个很好的教程, https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries http://cssmediaqueries.com/ 它像是     ! - 链接元素上的CSS媒体查询 - >     

<!-- CSS media query within a style sheet -->
<style>
@media (max-width: 600px) {
 .facet_sidebar {
display: none;
}
}
</style>