HTML CSS メモ

html

-----

<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="css/youso.css">
<title>CSS 子要素</title>
</head>
<body>

<ul>
<li>HELOO</li>
<li class="to">YES</li>
<li>tossy</li>
<li></li>
</ul>

<p>名前:<input type="text" name="name" disabled />
</p>
<p><input type="checkbox" name="check" value="1" />
<label for="check">Check???</label></p>

<div class="to4"><a href="" id="text">もっと見る</a></div>
<div id="box1"></div>
</body>
</html>

 

-------

CSS

@charset "UTF-8";

li:not(.to) { /* :not(除外するクラスや要素) 否定文 */
background-color: #000;
}


li:empty {
background: #333;/* 空の要素を選択 */
}

input[type=text]:enabled { /* enabledの時 有効 */
background: #dedede;
}

input[type=text]:disabled { /* disabledの時 有効 */
background: #dedede;
}

input[type=checkbox]:checked + label { /*-- checked チェックボックスが押されていたら*/
background: #000;
}

/*-- 三角形切り出し ---*/
.to4 {
width: 0;
height: 0;
border-style: solid;
border-width: 250px;
border-left-width: medium;
border-color: red transparent transparent transparent;
position: relative;
}

#text {
z-index: 10;
position: absolute;
top:-200px;
left: 20px;
color: #000;
font-size: 15px;
text-decoration: none;
color: #fff;
}

div:not(.to4) {
width: 100px;
height: 100px;
background: orange;
position: absolute;
top: 300px;
left: 300px;
}

#box1 {

opacity: 0.55;
transform: translate(20px 40px);
transform: scale(0.5, 2.5);
/*transition: skew(5deg, 10deg); 傾斜 角度をつける */
/*transition: rotate(90deg); 回転 */
/* transform-origin: 50% 50%; 規定値を変える デフォルト 50% 50% */
}