Warning: The magic method InvisibleReCaptcha\MchLib\Plugin\MchBasePublicPlugin::__wakeup() must have public visibility in /home/twotone/twotone.me/public_html/wp-content/plugins/invisible-recaptcha/includes/plugin/MchBasePublicPlugin.php on line 37
テスト .contents{ display: flex; justify-content: space-between; } .content{ background: #ccc; display: flex; justify-content: center; align-items: center; width: calc(100% / 3 - 20px); }
211px
423px
333px
jQuery(function($){ var maxHeight = 0; $('.content').each(function() { // 変数に入っている高さを上回ったら上書きする if ($(this).height() > maxHeight) { maxHeight = $(this).height(); } }); // 変数の数値を反映させる $('.content').css('height', maxHeight); });
【js】コンテンツの高さを一番高い要素に整える
2020/04/13