ボタンタグの中の文字をボタンないに納めるには
どこのcssをさわればいいですか
html
1 <a href=/themes class="btn-emergency"> 2 <span class="btn-emergency-bottom"></span> 3 <span class="btn-emergency-top"><span>あああああ</span></span> 4</a> 5コード
css
1*, 2*:before, 3*:after { 4 -webkit-box-sizing: inherit; 5 box-sizing: inherit; 6} 7 8html { 9 -webkit-box-sizing: border-box; 10 box-sizing: border-box; 11 font-size: 62.5%; 12} 13 14.btn, 15a.btn, 16button.btn { 17 font-size: 1.6rem; 18 font-weight: 700; 19 line-height: 1.5; 20 position: relative; 21 display: inline-block; 22 padding: 1rem 4rem; 23 cursor: pointer; 24 -webkit-user-select: none; 25 -moz-user-select: none; 26 -ms-user-select: none; 27 user-select: none; 28 -webkit-transition: all 0.3s; 29 transition: all 0.3s; 30 text-align: center; 31 vertical-align: middle; 32 text-decoration: none; 33 letter-spacing: 0.1em; 34 color: #212529; 35 border-radius: 0.5rem; 36} 37 38a.btn-emergency { 39 position: relative; 40 41 display: block; 42 43 width: 200px; 44 height: 130px; 45 margin: 0 auto; 46} 47 48a.btn-emergency:hover .btn-emergency-top { 49 top: 10px; 50 51 height: 50px; 52} 53 54a.btn-emergency:active .btn-emergency-top { 55 top: 20px; 56 57 height: 40px; 58} 59 60.btn-emergency-top { 61 position: absolute; 62 top: 0; 63 left: 20px; 64 65 width: 160px; 66 height: 60px; 67 margin-top: 30px; 68 69 -webkit-transition: all 0.3s; 70 71 transition: all 0.3s; 72 73 border-radius: 0 0 50% 50%; 74 background: #d62d2d; 75} 76 77.btn-emergency-top:before { 78 position: absolute; 79 top: -30px; 80 left: 0; 81 82 width: 160px; 83 height: 60px; 84 85 content: ""; 86 87 border-radius: 80px / 30px; 88 background: #ed4c4c; 89} 90 91.btn-emergency-top span { 92 font-size: 38px; 93 font-weight: bold; 94 95 position: absolute; 96 top: -24px; 97 left: 0; 98 99 width: 100%; 100 101 -webkit-transform: scaleY(0.75); 102 103 transform: scaleY(0.75); 104 text-align: center; 105 106 color: #f6a3a3; 107} 108 109.btn-emergency-bottom { 110 position: absolute; 111 top: 38px; 112 left: 0; 113 114 width: 200px; 115 height: 80px; 116 117 border-radius: 100px / 40px; 118 background: #d8e4ea; 119 -webkit-box-shadow: 0 8px 0 #c4cacc; 120 box-shadow: 0 8px 0 #c4cacc; 121} 122 123 124Resources![イメージ説明](47dbb8658706646cd0a29092c52a2c8b.png)
あなたの回答
tips
プレビュー