I want to show list items as 2 or more columns (dynamic alignment)

前端 未结 9 2051
无人及你
无人及你 2020-11-30 07:50

I am able to do the list using float:left; like this

\"enter

But

9条回答
  •  死守一世寂寞
    2020-11-30 08:21

    http://jsfiddle.net/rlemon/Y5ZvA/3/ ​ you can try this.. I haven't tested it with ie yet.

    ul {
        width:60px; height: 60px;
    }
    
    ul li{
        float:left;
        width:20px;
        list-style:none;
    }
    ul, ul li {
        -moz-transform: rotate(-90deg) scaleX(-1);
        -o-transform: rotate(-90deg) scaleX(-1);
        -webkit-transform: rotate(-90deg) scaleX(-1);
        -ms-transform: rotate(-90deg) scaleX(-1);
        transform: rotate(-90deg) scaleX(-1);
       /* IE8+ - must be on one line, unfortunately */ 
       -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=-3.061616997868383e-16, M12=1, M21=1, M22=3.061616997868383e-16, SizingMethod='auto expand')";
    
       /* IE6 and 7 */ 
       filter: progid:DXImageTransform.Microsoft.Matrix(
                M11=-3.061616997868383e-16,
                M12=1,
                M21=1,
                M22=3.061616997868383e-16,
                SizingMethod='auto expand');
    }
    ​
    

提交回复
热议问题