0
jqueryアニメーションを使用して、ホバー上のアイコンのサイズを変更しています。他の要素を移動させずにアイコンのサイズを変更する方法はありますか?アイコンの上にマウスを置いて下にスニペットを実行します。 (ここでは、私はいずれかのアイコンの上にhttps://semantic-ui.com/elements/icon.htmlホバーのためつもりだ効果がある)他の要素を移動させずにサイズ変更アイコン
$(document).ready(function() {
$('.icon').hover(function(){
$(this).stop().animate({ fontSize : '3em' });
}, function(){
$(this).stop().animate({ fontSize : '1.5em' });
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/1.11.8/semantic.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/1.11.8/semantic.min.css" rel="stylesheet"/>
<div class="ui doubling five column grid">
<div class="column">
<div class="ui center aligned segment basic">
<i class="large home icon"></i>
<p style="padding-top: 5px;">
home
</p>
</div>
</div>
</div>
some other content
を必要としませんそれが下に動かなければ「家」という言葉をカバーするように、UIの面で働きます。また、ここにはJSは必要ありません。 CSSを単独で ':hover'セレクタと' transition'ルールで使うことができます –
.doubling> .column> .ui {minimum-height:[THIS_BLOCK_HEIGHT_ON_HOVER]} – Beneris