Scss練習

ex1

<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8">
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class=”box box1">1</div>
<div class=”box box2">2</div>
<div class=”box box3">3</div>
</body>
</html>
$base-color: #008000;.box {
width: 300px;
height: 300px;
margin-bottom: 20px;
}
.box1 {
background: $base-color;
}
.box2 {
background: darken( $base-color, 20% );
}
.box3 {
background: lighten( $base-color, 10% );
}

https://codepen.io/jameskrauser/pen/YzQbeww

--

--

Jameskrauser Lee

For the last few years. i was involved mostly in the development of Automatic Fare collection system for the Chennai Metro. Familiar with C++ and iOS.