是否可以使用 CSS 将列表项的要点<li>
放在文本顶部,如下所示?
问问题
1127 次
1 回答
4
使用项目符号作为背景图像:
ul {
list-style-type: none;
padding: 0;
text-align: center; /* Optional, Just for demo */
}
ul li {
background: url(path/to/bullet.ext) center top no-repeat;
display: inline-block; /* <-- display list items in one line */
padding-top: 10px; /* <-- Change this according to the image size */
/* Or: */
/* padding: 10px 5px 0; */
/* top r&l bottom */
}
于 2013-08-26T20:45:35.300 回答