我正在使用CSS3的transform
属性。它在旋转后在div的左侧创建空间。继承我的JSfiddle
所以想要一些代码:
<div>
Maglevboard
</div>
<style>
div {
font-size:5em;
transform:rotate(-90deg);
display:inline-block;
}
</style>
答案 0 :(得分:3)
您可以通过添加翻译并使用正确的public class Puppy {
public Puppy(String name) {
// This constructor has one parameter, name.
System.out.println("Passed Name is :" + name );
}
public static void main(String [] args) {
// Following statement would create an object myPuppy
Puppy myPuppy = new Puppy( "tommy" );
}
}
来解决此问题。我想你想要
transform-origin
&#13;
div {
font-size: 5em;
transform-origin: 100% 0;
transform: translateX(-100%) rotate(-90deg);
display: inline-block;
}
&#13;