2018.12.15 2d形變,動畫,表格,多行文字垂直居中
阿新 • • 發佈:2018-12-14
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>複習預習</title>
<link href="css/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet">
</head>
<body>
<!-- 1.過渡 -->
<style type="text/css">
/*偽類 == class*/
div.box:hover {
background-color: green;
height: 100px;
}
.box.b {
background-color: yellow;
/*持續時間 延遲時間 過渡屬性 過渡曲線*/
transition: 1s .1s all cubic-bezier(0, 2.43, 0.82, 1.9);
/*高度0結合overflow:hidden 等價於 影藏*/
height: 10px;
overflow: hidden;
}
</style>
<!-- 2.陰影 -->
<style type="text/css">
.box {
margin-top: 10px;
/*x y 虛化 寬度 顏色*/
box-shadow: 120px 0 100px 0 red, 240px 0 0px 10px blue;
}
</style>
<!-- 3.偽類設計邊框 -->
<style type="text/css">
.box {
width: 100px;
height: 100px;
background-color: yellow;
position: relative;
text-align: center;
}
.box:before {
content: "";
width: 90px;
height: 1px;