<script> //回転 $(function () { $('.toggle').click(function () { $(this).toggleClass('active'); }); }); ///現れる $(function(){ $(".toggle").on("click", function() { $(this).next().slideToggle(); }); }); </script>
//クリックで矢印回転 基本 .toggle { position: relative; display: inline-block; padding-right: 1em; } .toggle:after { content: ""; display: block; position: absolute; } .toggle.active:after { } //矢印が回転するアニメーション .toggle:after { content: ""; display: block; position: absolute; top: 35%; right: 0; width: 11px; height: 11px; border-top: 2px solid #000; border-right: 2px solid #000; transform: rotate(45deg); } .toggle.active:after { transform: rotate(135deg); transition: .3s; }
//全国 .d_bg_green{ background: #edffed; .center_title_box .title{ color: #333;} .erea_wrap{ margin-top: 4rem; .erea_chihou_wrap{ margin-bottom: 2rem; .title{ font-weight: bold; margin: 1rem 0; font-size: 24px;} //.toggle .chihou_con{background: #fff; padding: 2rem; border-radius: 1rem; //display: none;///toggleでオープン .chihou_one{ font-size: 18px; h4{font-weight: bold;}} } } } }