WEBサイトに使えるパーツは様々ありますが、
それらをデモページにまとめていこうと思います。
要素を回転させる
くるくると回る要素のデモです。
※デモページなので簡素ですが…
補足ですが、下記サイトは選択した色の反対色や再度の違いなどを提案してくれますので、活用ください!
http://colorsupplyyy.com/app/
回転させる要素だけですが、コードは下記になります。
※参考:https://www.nxworld.net/tips/css-element-rotate.html
-
Cocospace
-
School
-
Contents
-
Programming
-
Design
ul {
position: relative;
list-style: none;
width: 300px;
height: 300px;
margin: 40px auto 0;
padding: 0;
animation: rotate 30s linear infinite;
}
@keyframes rotate {
100% { transform: rotate(360deg); }
}
ul li {
position: absolute;
width: 100px;
height: 100px;
margin: 0;
padding: 30px 0 0;
border-radius: 50%;
color: #fff;
text-align: center;
box-sizing: border-box;
animation: rotate-elm 30s linear infinite;
}
@keyframes rotate-elm {
100% { transform: rotate(-360deg); }
}
ul li .fa {
font-size: 26px;
}
ul li p {
margin: 5px 0 0;
font: 400 13px/1 'Lato', sans-serif;
}
ul li:nth-child(1) {
top: 0;
left: 100px;
background-color: #55acee;
}
ul li:nth-child(2) {
top: 70px;
left: 5px;
background-color: #3b5998;
}
ul li:nth-child(3) {
top: 70px;
right: 5px;
background-color: #dc4e41;
}
ul li:nth-child(4) {
bottom: 20px;
left: 40px;
background-color: #bd081c;
}
ul li:nth-child(5) {
bottom: 20px;
right: 40px;
background-color: #125688;
}
cssをいじれば形の変化やサイズなども調整できますので、
WEBサイトにもちょっとした動きを付けられそうですね。
今後も更新していきますね~

