我目前正在尝试创建一个小菜单,它可以在用户滚动时改变位置。我提出了一种样式-http://jsfiddle.net/piedoom/s8tyn/
不过,这看起来很难看。我如何将每个文本div下面的每个点居中?我尝试过类似text-align:center
这样的操作,但没有效果。
使用margin:auto
的css样式将子div居中。
http://jsfidle.net/s8tyn/1/
只需将您的样式改为next即可
.unselectedcircle
{
background: grey;
position: relative;
top: 32px;
border-radius: 100%;
width: 10px;
height: 10px;
margin: 0 auto;
}
演示