【发布时间】:2013-10-04 22:12:48
【问题描述】:
我正在尝试使用旋转以 45 度(或足够接近)显示 html 中的文本
不幸的是,它看起来一点也不好看。有谁知道解决这个问题的方法,或者可能是在 45 度时比其他字体呈现更好的字体?
下面的例子 http://jsfiddle.net/stevewill61/3WpfP/
jsfiddle 中横幅的 CSS 如下
.test:before {
position: absolute;
background: #008000;
display: inline-block;
content:'Live';
-webkit-transform: rotate(-45deg);
font-size: 10pt;
top: 5px;
left: -20px;
font-weight: bold;
color: #fff;
padding: 2px 25px;
box-shadow: 1px 1px 1px #000;
font-family: Arial;
}
这是按要求提供的图片
【问题讨论】:
-
请描述问题或分享截图。对我来说,文本在 chrome 上很好地显示,但在 Firefox 上没有旋转(可能是因为 webkit 前缀)。编辑:如果添加
-moz-transform: rotate(-45deg);,在火狐上也能很好的显示 -
对我来说看起来不错。这是我看到的:i.stack.imgur.com/MJYRs.png
标签: html css webkit-transform