div {
transition-property: width;
transition-duration: 5s;
}
div:hover { width: 100px }
div {
width: 20px;
transition: width 3s, transform 3s;
}
div:hover {
width: 100px;
transform: rotate(90deg);
}
@keyframes name-of-animation {
keyframe-selector {
property: value;
…
property: value;
}
…
keyframe-selector {
property: value;
…
property: value;
}
}
keyframe-selector is either ‘from’ (=0%), ‘to’ (=100%) or a percent of animation
@keyframes move {
0% { left: 100px; }
40% { left: 130px; }
100% { left: 150px; }
}
div {
animation: move 5s;
}
div {
column-count : 3;
column-rule-color : black;
column-rule-style : dotted;
column-rule-width : 1px;
}
div {
columns: 40px 2;
}
div {
text-shadow: 2px 2px 4px #ff00dd;
}
div {
box-shadow: 4px 6px 6px -2px #aaaaff;
}
<div class="flexdiv">
<div> 1 </div>
<div> 2 </div>
</div>
.flexdiv {
display: flex;
flex-direction: column | column-reverse | row | row-reverse;
flex-wrap: nowrap | wrap | wrap-reverse;
justify-content: center | flex-start | flex-end; // align horizontally
align-items: center | flex-start | flex-end; // align vertically
}
@font-size: 16px;
.bordered (@width) {
border: @width solid #ddd;
&:hover {
border-color: #999;
}
}
h1 { .bordered(5px);
font-size: @font-size;
}
@media only screen and (max-width: 500px) {
#div1 {
width: 100%;
}
}
@media only screen and (min-width: 500px) {
….
}
@media only screen and (orientation: landscape) {
…
}
<style>
body { display: flex; }
#left {width: 25%; background-color: #ff88aa}
#main {width: 75%; background-color: #aa22ff}
@media screen and (max-width: 800px) {
body { display: flex;
flex-direction: column; }
#left, #main { width: 100%; }
}
</style>
<body>
<section id=“left”> …. </section>
<section id=“main”> …. </section>
</body>
<link rel="stylesheet" type="text/css"
href=https://fonts.googleapis.com/css?family=Jura>
<style>
body {
color: #cfd2da;
font-family: 'Jura', sans-serif;
font-size: 0.9rem;
}
</style>
<link rel="stylesheet" href=”https://fonts.googleapis.com/icon?family=Material+Icons”>
<i class="material-icons" style="font-size:48px;color:red"> folder </i>
<i class="material-icons" style="font-size:48px;color:red"> cloud_upload </i>
<link rel="stylesheet" href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css>
<i class="fa fa-car" style="font-size:60px;color:red;"> </i>
<script defer src=”https://use.fontawesome.com/releases/v5.0.8/js/all.js”> </script>
<li> <div>
<a href="#" id="1">
<i class="fab fa-html5"> </i>
Lab 1 – HTML
</a>
</div> </li>
<li> <div>
<a href="#" id="2">
<i class="fab fa-css3-alt"> </i>
Lab 2 - CSS simple
</a>
</div> </li>
...