I'm wondering if there's a way to add extra margin-left
to each next item, such as
-Item1
-Item2
-Item3
-and so forth
Is this possible with CSS3? I haven't seen anything for 'every next item'.
I'm wondering if there's a way to add extra margin-left
to each next item, such as
-Item1
-Item2
-Item3
-and so forth
Is this possible with CSS3? I haven't seen anything for 'every next item'.
Sure, you can. But it's freaky ...
Demo : http://jsbin.com/exuwej/1/edit
CSS :
ul {
-moz-transform: rotate(-20deg);
-ms-transform: rotate(-20deg);
-o-transform: rotate(-20deg);
-webkit-transform: rotate(-20deg);
transform: rotate(-20deg);
display: block;
width: 500px;
padding: 0;
margin-left: 100px;
margin-top: -50px;
list-style: none;
height: 400px;
}
ul li {
-moz-transform: rotate(20deg);
-ms-transform: rotate(20deg);
-o-transform: rotate(20deg);
-webkit-transform: rotate(20deg);
transform: rotate(20deg);
width: 60%;
border: 1px solid blue;
padding: 0;
margin: 0;
display: block;
float: left;
text-align: left;
}
HTML :
<ul>
<li>a</li>
<li>b</li>
<li>c</li>
</ul>
There's no way to do this indefinitely, without javascript, but you could write a handful of CSS selectors for it. Though I would advise against doing this for reasons already stated by others.
li {
margin-left: 20px;
}
li+li {
margin-left: 40px;
}
li+li+li {
margin-left: 60px;
}
li+li+li+li {
margin-left: 80px;
}
- ...
- ...
– mikeswright49 May 08 '13 at 19:08