1
我想對齊箭頭圖標(包裹在<i>
標記中)以與按鈕的中心對齊(垂直)。它在按鈕中只有一行文本的情況下工作,但只要文本到達兩行,箭頭的對齊關閉。我該如何解決?任何幫助深表感謝!如何將箭頭圖標垂直對齊到中心
.btn-container {
\t margin: 2% 0;
\t max-width:350px;
}
.btn-container a {
\t text-decoration:none;
\t color:#5A469B;
\t font-size:1.2em;
\t text-align:left;
\t line-height:1.2;
\t padding-left:20px;
}
.btn-rectangle p {
\t color:#fff;
\t text-align:left;
}
.btn-rectangle {
\t background-color:#fff;
\t border: solid 3px #5A469B;
\t padding:8% 5%;
display:block;
\t width:100%;
\t text-transform:capitalize;
}
.btn-rectangle:hover {
\t background-color:#5A469B;
\t color:#fff;
\t border:solid 3px #5A469B;
\t -webkit-transition: all 500ms ease;
\t -moz-transition: all 500ms ease;
\t -ms-transition: all 500ms ease;
\t -o-transition: all 500ms ease;
\t transition: all 500ms ease;
}
.flaticon-move13 {
\t padding-left: 10px;
\t font-size:1.2em;
\t font-weight:bold;
}
.move-right {
\t float:right;
}
@font-face {
\t font-family: "Flaticon";
\t src: url("flaticon.eot");
\t src: url("flaticon.eot#iefix") format("embedded-opentype"),
\t url("flaticon.woff") format("woff"),
\t url("flaticon.ttf") format("truetype"),
\t url("flaticon.svg") format("svg");
\t font-weight: normal;
\t font-style: normal;
}
[class^="flaticon-"]:before, [class*=" flaticon-"]:before,
[class^="flaticon-"]:after, [class*=" flaticon-"]:after {
\t font-family: Flaticon;
font-style: normal;
}.flaticon-arrow395:before {
\t content: "\e000";
}
.flaticon-bottom4:before {
\t content: "\e001";
}
.flaticon-move13:before {
\t content: "\e002";
}
<div class="btn-container">
<a href="#" class="btn-rectangle">the square represents the arrow. Once it's two lines of text it isn't aligned.
<i class="move-right flaticon-move13"></i></a>
</div>