我有一个样式表,它控制一个 div (id="qab") 中所有内容的布局。它以如下重置开始:-
#qab div, #qab span, #qab applet, #qab object, #qab iframe, #qab h1, #qab h2, #qab h3, #qab h4, #qab h5, #qab h6, #qab p, #qab blockquote, #qab pre, #qab a, #qab abbr, #qab acronym, #qab address, #qab big, #qab cite, #qab code, #qab del, #qab dfn, #qab em, #qab img, #qab ins, #qab kbd, #qab q, #qab s, #qab samp, #qab small, #qab strike, #qab strong, #qab sub, #qab sup, #qab tt, #qab var, #qab b, #qab u, #qab i, #qab center, #qab dl, #qab dt, #qab dd, #qab ol, #qab ul, #qab li, #qab fieldset, #qab form, #qab label, #qab legend, #qab table, #qab caption, #qab tbody, #qab tfoot, #qab thead, #qab tr, #qab th, #qab td, #qab article, #qab aside, #qab canvas, #qab details, #qab embed, #qab figure, #qab figcaption, #qab footer, #qab header, #qab hgroup, #qab menu, #qab nav, #qab output, #qab ruby, #qab section, #qab summary, #qab time, #qab mark, #qab audio, #qab video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
background: none;
}
#qab article, #qab aside, #qab details, #qab figcaption, #qab figure, #qab footer, #qab header, #qab hgroup, #qab menu, #qab nav, #qab section {
display: block;
}
#qab ol, #qab ul {
list-style: none;
}
#qab blockquote, #qab q {
quotes: none;
}
#qab blockquote:before, #qab blockquote:after, #qab q:before, #qab q:after {
content: '';
content: none;
}
#qab table {
border-collapse: collapse;
border-spacing: 0;
}
#qab b, #qab strong {
font-weight: bold;
}
这很好用,除非我想使用 jquery-ui 元素,这些元素最终被它重置,因此不起作用。
我发现让它工作的唯一方法是在所有 .ui 样式前面加上#qab,但是在 qab div 之外使用的任何东西(例如 jquery 生成的对话框)都不起作用。
我确定我遗漏了一些明显的东西,但我看不到它。