当你将鼠标悬停在它上面时,li元素向右滑动。我怎样才能改变它,使它可以从右向左移动?我也希望子弹出现在右侧。 我试过改变子弹的位置,也改变了填充 - 左填充 - 右键。但它不会工作。谁能帮我这个?如何让这个CSS Webkit过渡从左到右?
.cmsms_timeline {
\t position:relative;
\t margin:-11px 0 0 0;
\t padding:0 0 37px 29px;
\t list-style:none;
}
.cmsms_timeline li {
\t position:relative;
\t padding-top:24px;
}
.cmsms_timeline li:before,
.cmsms_timeline:before {
\t position:absolute;
\t top:-2px;
\t left:0;
\t -webkit-box-sizing:border-box;
\t -moz-box-sizing:border-box;
\t box-sizing:border-box;
\t width:1px;
\t height:28px;
\t background:rgba(0, 0, 0, .08);
\t content:'';
}
.cmsms_timeline:before {
\t top:auto;
\t bottom:11px;
\t left:29px;
}
.cmsms_timeline li a {
\t position:relative;
\t padding-left:13px;
\t -webkit-transition:all .3s ease-in-out;
\t -moz-transition:all .3s ease-in-out;
\t -ms-transition:all .3s ease-in-out;
\t -o-transition:all .3s ease-in-out;
\t transition:all .3s ease-in-out;
}
.cmsms_timeline li a:hover {padding-left:19px;}
.cmsms_timeline li a:before {
\t position:absolute;
\t top:5px;
\t left:-2px;
\t width:5px;
\t height:5px;
\t -webkit-border-radius:50%;
\t -moz-border-radius:50%;
\t border-radius:50%;
\t background:rgba(0, 0, 0, .2);
\t content:'';
\t -webkit-transition:background .3s ease-in-out;
\t -moz-transition:background .3s ease-in-out;
\t -ms-transition:background .3s ease-in-out;
\t -o-transition:background .3s ease-in-out;
\t transition:background .3s ease-in-out;
}
<ul class="cmsms_timeline">
<li><a>hello world</a></li>
</ul>
谢谢!有效。但是,我怎样才能将子弹移到右侧?当我尝试这样做时,子弹也随着文本一起移动!我的意思是它变得混乱了! – user1872874 2015-02-07 20:53:32
为什么一个-1?如果你的答案有问题,请发表评论,这样我们都可以知道我做错了什么! – 2015-02-07 20:59:35
@ user1872874查看已更新答案中的链接 – 2015-02-07 21:00:18