2017-05-30 10 views
-2

私は1年間のUI開発を構築しており、設計に関して新しい構造を探求したいと考えています。CSSを使用してテキストを右に回転

だから私はこのようなものになると私のパネル見出しにスタイリングしています。

enter image description here

は、今のように私は、ブートストラップCSSでpanel headingのデフォルトのスタイルを行っています。

+1

-webkit-変換後、必要がない場合:回転(270deg)。 -moz-transform:rotate(270deg); -o-transform:rotate(270deg); 書き込みモード:lr-tb; – Sharon

+1

'transform:rotate(270deg)' - [CSS3トランスフォームのプロパティ](https://www.w3schools.com/cssref/css3_pr_transform.asp) –

答えて

2

私はちょうどpositionでそれを作ることができる例を投稿しました。あなたは第二のスニペットをチェック

.main { 
 
    position:relative; 
 
} 
 

 
.tilt { 
 
    position:absolute; 
 
    top:30px; 
 
    left:0px; 
 
    transform:rotate(-90deg); 
 
    color:#000; 
 
    padding:0 10px; 
 
    border:1px solid #000; 
 
    text-align:center; 
 
} 
 
.tilt p { 
 
    margin:0px; 
 
}
<div class="main"> 
 
<div class="tilt"> 
 
<p> 
 
HELLO 
 
</p> 
 
</div> 
 
</div>

.tilt { 
 
    transform:rotate(-90deg); 
 
    color#000; 
 
    padding:0 10px; 
 
    border:1px solid #000; 
 
    text-align:center; 
 
    display:inline-block; 
 
    margin-top:22px; 
 
} 
 
.tilt p { 
 
    margin:0px; 
 
}
<div class="tilt"> 
 
<p> 
 
HELLO 
 
</p> 
 
</div>

関連する問題