color: blue;font-size: 16px;font-weight: bold;normal:標準bold:太字font-family: serif;serif:明朝体sans-serif:ゴシック体font-style: italic;normal:標準italic:イタリック体oblique:斜体text-decoration: underline;none:無効underline:下線overline:上線line-through:打消し線text-align: center;center, right, lefttext-indent: 30px;border: 1px solid gray;枠線の太さ 種類 色solid:実線double:二重線dotted:点線dashed:破線width: 200px;img, input, select, textareaには有効height: 200px;img, input, select, textareaには有効margin: 50px;padding: 50px;display: flex;display:表示種別flex:伸縮padding・border・marginでできているwidth)padding)×2border)×2background-color: gray;background-image: url(" ");url()100% 100%:要素にぴったり収まるcover:縦横比を保ったまま隙間のない背景となるcontain:縦横比を保ったまま全体を表示するbackground-repeat: no-repeat;repeat:繰り返す(初期値)no-repeat:繰り返ししないrepeat-x:横方向にのみ繰り返すrepeat-y:縦方向にのみ繰り返すbackground-position: top;top, right, bottom, left, center#をつける#000000#ffffff#f53)#ff000099)rgb()を使用するrgba(0,0,0,0.5))transparent#parent{
width: 300px;
height: 300px;
border: 1px solid blue;
position: reletive;
}
.child{
width: 100px;
height: 100px;
border: 1px solid red;
}
.center{
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px
margin: auto;
}
positionプロパティ:配置のプロパティ
reletive:通常の配置absolute:position: reletive;を設定した親要素に対する絶対位置で配置red, top, left, anime, linear, normal, bothpx, %, s(s以外は値が0の場合省略可能)transform: scale(3);background-image: url(" ");background: linear-gradient(white, gray);margin-left: calc(50% - 50px);width: calc(100px * cos(30deg));