###■前提
http://www.webopixel.net/lab/sample/13/1028css3-onepoint/
こちらのデモの4つ目「04.枠線のアニメーション」を使用しています。
###■目的
上のマウスホバーのアニメーションを変えないまま、<a>タグの中で改行したいです。
###■問題
下記CSSだと、丸の中の文字を改行させることができません。
html
1<a href="#" class="btn04">BUTTON</a>
css
1.btn04 { 2 color: #fff; 3 text-decoration: none; 4 text-align: center; 5 position: relative; 6 z-index: 10; 7 display: block; 8 width: 150px; 9 height: 150px; 10 line-height: 150px; 11} 12 13.btn04::before { 14 content: ''; 15 background-color: #dda284; 16 display: block; 17 position: absolute; 18 width: 150px; 19 height: 150px; 20 z-index: -1; 21 border-radius: 50%; 22 box-shadow: 23 0 0 0 0 #fff, 24 0 0 0 0 #dda284; 25 transition: all .2s ease; 26 -webkit-transition: all .2s ease; 27} 28.btn04:hover::before { 29 transform: scale(0.8); 30 -webkit-transform: scale(0.8); 31 box-shadow: 32 0 0 0 25px #fff, 33 0 0 0 27px #dda284; 34}
<br>を途中に書いてもダメですし、、
どなたか、丸の中の文字を、丸の中に収めたまま、改行させるすべをご存知ありませんでしょうか?
###■ベストアンサー後の補足
お二方、ご回答ありがとうございます。
ところでこれって、position:fixed;はできないのでしょうか?
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/10/08 02:21
退会済みユーザー
2016/10/08 02:25