SlickGrid-rotated column headers

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-19 01:15:16

问题


How can I rotate my column headers 90 degrees? I've tried this, but haven't been able to get it to work.

.slick-column-name {
    -webkit-transform: rotate(-90deg);
    -moz-transform: rotate(-90deg);
    display: block;
    vertical-align: bottom;
}

回答1:


For those has not yet found a good solution:

 /* Rotate the header*/
.slick-column-name {
    -webkit-transform: rotate(-90deg);
    -moz-transform: rotate(-90deg);
    -ms-transform: rotate(-90deg);
    -o-transform: rotate(-90deg);
    transform: rotate(-90deg);

    -webkit-transform-origin: 0px 0px;
    -moz-transform-origin: 50% 50%;
    -ms-transform-origin: 50% 50%;
    -o-transform-origin: 50% 50%;
    transform-origin: 50% 50%;

    margin-top: 90px !important;
    font-size: 0.8em;

    display: block;


}
/* set the header height*/
.slick-header-columns, .slick-header-column {
    height: 100px !important;
    background-image: url('');
}

The above CSS rotates the header name, and moves it down 90px, it sizes the header to be of 100px in height. You can change the 90px and 100px to whatever you want.




回答2:


It works if you replace the <span> tag with the header name with a <div> tag in slick.grid.js. Somehow transformation works only for div tags.



来源:https://stackoverflow.com/questions/9917916/slickgrid-rotated-column-headers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!