Open23
css
文字の間隔を開けているときのtext-align仕様時、下記のコードをセットと考える。
text-align: center;
letter-spacing: 1em;
text-indent: 1em;
真ん中よせ?
.side_banner {
width: calc(100% + 26px); //(右:親サイズに合わせる100% 左:左右親以上の大きさ(右13px 左13px))
margin: 0 -13px; //−13px左の半分のサイズを記入
}
HTMLのみで画像切り替え
classはimgタグで指定するみたい
改行させない
改行の制御
CardItem__pushPoint_content p,
.CardItem__pushPoint_content ul li {
word-break: keep-all;
overflow-wrap: break-word;
}
※必要な箇所に<wbr>を設置
picture判定
<picture>
<source :srcset="'/images/header.png'" media="(max-width:600px)">
<source :srcset="'/images/header_min980.png'" media="(max-width:980px)">
<img
class="header_img"
:class = "isShow"
:src="'/images/header.png'"
alt=""
/>
</picture>
幅の確認
* {
outline: 1px solid magenta;
}
疑似要素
動的に擬似要素内の数値を変更する。
calcは真ん中に寄せる時によく使う
ブロック要素を下揃えにする
テキストを下揃えにする
vertical-align
上下左右の中央よせ
flexの制御
gap
flexの間隔を指定
要素を上下入れ替る
命名規則
CSSでメディアクエリ(Media Queries)の基本的な書き方
概要を詳しく説明してくれている
CSSでメディアクエリ(Media Queries)の基本的な書き方
chromeでの10px以下のフォントを表示する方法。
ulやolの padding-left
のアレコレ
子要素指定
img制御
線を引く
BreakPoint
font-size 調整用
乗算とか
画像が自動で切り替わる
チェックボックス実装
<li class="SearchFormService__ListItem">
<label for="used_service_4" class="SearchFormService__List-checkbox">
<input id="used_service_4" class="used_service" type="checkbox" name="used_service_option"
value="4">
<span class="u-ml-5">アコム</span>
</label>
</li>
.SearchFormService__List-checkbox input[type="checkbox"] {
display: none;
}
.SearchFormService__List-checkbox {
display: none;
cursor: pointer;
display: inline-block;
position: relative;
padding-left: 25px;
padding-right: 10px;
}
.SearchFormService__List-checkbox span::before {
content: "";
position: absolute;
display: block;
box-sizing: border-box;
width: 1.3rem;
height: 1.3rem;
margin-top: -10px;
left: 0;
top: 55%;
border: 2px solid #0c5ed4;
background-color: #dfe7f3;
}
.SearchFormService__List label input[type="checkbox"]:checked
+ span::before {
background-color: #0c5ed4;
}
.SearchFormService__List label input[type="checkbox"]:checked
+ span::after {
content: "";
position: absolute;
display: block;
box-sizing: border-box;
width: 16px;
height: 7px;
margin-top: -8px;
top: 49%;
left: 1px;
transform: rotate(310deg);
border-bottom: 2px solid;
border-left: 2px solid;
border-color: #fff;
}
参考になるかも
css
吹き出しをcssのみで作成