CSS让英文竖排,关键是支持火狐,IE下没问题,有办法吗?

html-css022

CSS让英文竖排,关键是支持火狐,IE下没问题,有办法吗?,第1张

您好!很高兴为您答疑!

兼容火狐和IE的方案:

.rotate {

/* Safari */

-webkit-transform: rotate(-90deg)

/* Firefox */

-moz-transform: rotate(-90deg)

/* IE */

-ms-transform: rotate(-90deg)

/* Opera */

-o-transform: rotate(-90deg)

/* Internet Explorer */

filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3)

}

您可以在火狐社区了解更多内容。希望我的回答对您有所帮助,如有疑问,欢迎继续在本平台咨询。

一、使用writing-mode属性语法:writing-mode:lr-tb或writing-mode:tb-rl参数:1、lr-tb:从左向右,从上往下2、tb-rl:从上往下,从右向左运行代码发现,ie显示正常,火狐却不行,所以不建议使用writing-mode属性,下面使用模拟方法实现。 二、模拟文字竖排代码:ul{width:100pxheight:80pxoverflow:hiddenlist-style:none}ul li{float:rightdisplay:inlinemargin-left:4pxwidth:14pxheight:100pxfont-size:14pxword-wrap:break-wordword-break:nomal}此方法让li右浮动,设置li宽度和字宽度一样都是14px,这样就自动换行了。另外,“word-wrap:break-wordword-break:nomal”这句实现标点自动换行(连续字符自动换行)。