时间:2024-02-15 14:10:01 | 来源:网站运营
时间:2024-02-15 14:10:01 来源:网站运营
如何设计CSS页面翻页?:写样式还好,关键是翻页要不要动画,还是只是内容变,布局和样式写起来完全不一样的。<!DOCTYPE html><html lang="zh-cmn-Hans-CN"><head> <meta charset="utf-8" /> <title>Document</title> <meta content="" name="keywords" /> <meta content="" name="description" /> <meta content="webkit" name="renderer" /> <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" /> <meta content="width=device-width, initial-scale=1, user-scalable=no" name="viewport" /> <link href="#" rel="icon" type="image/png" /> <style> .box { border: 6px solid #4472c4; border-radius: 30px; display: inline-block; width: 280px; height: 320px; position: relative; background-color:#FFF; } .box::before,.box::after{ content:""; display: inline-block; border: 6px solid #4472c4; border-radius: 30px; height:100%; width:100%; position:absolute; z-index:-1; right:-25px; top:-6px; } .box::after{ right:-44px; } .title { border-bottom: 6px solid #4472c4; line-height: 3; width:324px; } .pagination { position: absolute; width: 100%; bottom: 0; left: 0; display: flex; justify-content: space-between; font-size: 30px; } .previous, .next { margin: .25em .5em; } </style></head><body> <div class="box"> <div class="title">title</div> <div class="content">content</div> <div class="pagination"> <div class="previous"><</div> <div class="next">></div> </div> </div> <script> </script></body></html>
如果是翻页需要动画,比如当前页要动画,然后移除元素,得配合JS,布局样式都不一样。关键词:设计