私は、ゆっくりと遷移する際に、エレメントの左右に「境界線」またはアンダー/アンダーラインが出現するような要素に取り組んできました。ボトムとアンダーライン/アンダーラインをアニメーション化する
これは私がこれまで持っているところである:私が試したhttp://codepen.io/anon/pen/RRNjgo
.sliding-middle-out:hover {
font-size: 30px;
transition: font-size 2s ease;
}
.dark {
background-color: black;
display: inline-block;
min-width: 200px;
min-height: 300px;text-align: center;
cursor: pointer;
}
.dark h1 {
color: white;
text-align: center;
}
.sliding-middle-out {
display: inline-block;
position: relative;
padding-bottom: 3px;
}
.sliding-middle-out h1:after {
content: '';
display: block;
margin: auto;
height: 3px;
width: 0px;
background: transparent;
transition: width 2s ease, background-color .5s ease;
}
.sliding-middle-out:hover h1:after {
width: 50%;
background: #b7d333;
}
.sliding-middle-out h1:before {
content: '';
display: block;
margin: auto;
height: 3px;
width: 0px;
background: transparent;
transition: width 2s ease, background-color .5s ease;
}
.sliding-middle-out:hover h1:before {
width: 50%;
background: #b7d333;
border-left: 1px solid black;
}
<div class="dark sliding-middle-out">
\t <h1 class="">FAQs</h1>
</div>
一つのアプローチは、下/上線の移行が終了した後、H1要素に境界線を表示するようにしたが、それを働かせることができませんでした。
しかし、私はどのように私が望む効果を得るかを理解できません。
ここからこのプロジェクトのベースを取得しました。 http://bradsknutson.com/blog/css-sliding-underline/
、それは国境の状態を維持しますか? – TOM