本文主要是介绍web前端——HTML+CSS实现奥运五环,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
web前端——HTML+CSS实现奥运五环
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>* {padding: 0;margin: 0;box-sizing: border-box;}body {height: 100vh;display: flex;justify-content: center;align-items: center;background: rgb(224, 212, 203);}.container {width: 500px;display: flex;flex-wrap: wrap;justify-content: center;transform-style: preserve-3d;}.container .item {width: 150px;height: 150px;border: 9px solid black;border-radius: 50%;margin: 4px;}.container .item:nth-child(1) {border-color: blue;}.container .item:nth-child(2) {border-color: black;transform: translateZ(-2px) rotateX(2deg);}.container .item:nth-child(3) {border-color: red;transform: translateZ(-3px) rotateX(4deg);}.container .item:nth-child(4) {border-color: yellow;transform-origin: center 25%;transform: translateY(-70px) rotateX(1deg);}.container .item:nth-child(5) {border-color: green;transform: translateY(-70px) translateZ(2px) rotateX(3deg);}</style>
</head><body><div class="container"><div class="item"></div><div class="item"></div><div class="item"></div><div class="item"></div><div class="item"></div></div>
</body></html>
这篇关于web前端——HTML+CSS实现奥运五环的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!