什么是默认列表样式(CSS)? [英] What is default list styling (CSS)?
问题描述
在我的网站上,我使用reset.css。它添加到列表样式:
On my website I use reset.css. It adds exactly this to list styles:
ol, ul {
list-style: none outside none;
}
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, font, 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 {
background: none repeat scroll 0 0 transparent;
border: 0 none;
font-size: 100%;
margin: 0;
outline: 0 none;
padding: 0;
vertical-align: baseline;
}
问题是所有列表样式都设置为 NONE
。我想恢复为网站子页面上的所有列表(所有列表 .my_container
)的原始列表样式(默认)。
The problem is that all list styles are set to NONE
with this. I want to revert back original list styles (default) for all lists on website sub-pages only (all lists in .my_container
).
当我尝试设置 list-style-type
到继承
是不继承浏览器的默认样式只是为这个CSS属性。
When I try settings things like list-style-type
to inherit
is doesn't inherit the browser's default styles just for this CSS property.
有没有办法继承原来的浏览器的样式的某些属性,而不修改reset.css? >
Is there any way to inherit the original browser's styles for certain properties without modifying reset.css?
推荐答案
我用来设置这个CSS来移除reset:
I used to set this CSS to remove the reset :
ul {
list-style-type: disc;
list-style-position: inside;
}
ol {
list-style-type: decimal;
list-style-position: inside;
}
ul ul, ol ul {
list-style-type: circle;
list-style-position: inside;
margin-left: 15px;
}
ol ol, ul ol {
list-style-type: lower-latin;
list-style-position: inside;
margin-left: 15px;
}
编辑:与特定课程...
EDIT : with a specific class of course...
这篇关于什么是默认列表样式(CSS)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!