当前位置:网站首页>Shandong University project training (VIII) design rotation map entry page
Shandong University project training (VIII) design rotation map entry page
2022-06-29 18:33:00 【MeditationRain】
List of articles
This time I designed an entry page for our project , Is a full screen dynamic carousel , And there are two buttons in the middle of the page for entering the actual project page .
One 、Swiper Introduce :
Swiper Is a free and lightweight mobile device touch slider js frame , Use hardware to accelerate the transition ( If the device supports ). Mainly used for mobile websites 、 Move web apps,native apps and hybrid apps. Mainly for IOS And designed , meanwhile , stay Android、WP8 The system also has a good user experience ,Swiper from 3.0 No more full support at first PC End . therefore , If you need to be in PC More browsers are compatible on the Internet , You can choose Swiper2.x.
Two 、Swiper introduce
Swiper download :

Import the used files into the project folder :

Add plug-ins :
<!DOCTYPE html> <html> <head> ... <link rel="stylesheet" href="dist/css/swiper-bundle.min.css"> </head> <body> ... <script src="dist/js/swiper-bundle.min.js"></script> ... </body> </html>add to HTML Content :
<div class="swiper">
<div class="swiper-wrapper">
<div class="swiper-slide">Slide 1</div>
<div class="swiper-slide">Slide 2</div>
<div class="swiper-slide">Slide 3</div>
</div>
<!-- If you need a pager -->
<div class="swiper-pagination"></div>
<!-- If you need a navigation button -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<!-- If you need a scroll bar -->
<div class="swiper-scrollbar"></div>
</div>
Navigation and other components can be placed in Swiper Outside the container
3、 ... and 、Swiper Use
What I used in the project was a full screen carousel , There are dynamic indication points below , And it is played in a loop .

HTML file :
<div class="swiper mySwiper">
<!-- Loading pictures -->
<div class="swiper-wrapper">
<div class="swiper-slide"><img src="images/1.jpg" alt=""></div>
<div class="swiper-slide"><img src="images/2.jpg" alt=""></div>
<div class="swiper-slide"><img src="images/3.jpg" alt=""></div>
<div class="swiper-slide"><img src="images/4.jpg" alt=""></div>
<div class="swiper-slide"><img src="images/5.jpg" alt=""></div>
</div>
<!-- Dynamic indication point -->
<div class="swiper-pagination"></div>
<!-- Page switch button -->
<div class="middle">
<a class="btn btn3" href="./check.html"> Check the air quality of city stations </a>
<a class="btn btn4"> Check the pollution level of the city </a>
</div>
</div>
Pattern design :
.swiper {
width: 100%;
height: 100%;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
/* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
.swiper-slide img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.middle {
position: absolute;
top: 50%;
left: 50%;
z-index: 2;
transform: translate(-50%,-50%);
}
.btn{
z-index: 2;
display: inline-block;
position: relative;
color: white;
font-size: 14px;
font-family: "montserrat";
text-decoration: none;
margin: 30px 10px;
background: rgba(0, 0, 0, 0.8);
border: 2px solid #ff7675;
padding: 14px 60px;
text-transform: uppercase;
overflow: hidden;
transition: 1s all ease;
}
.btn::before{
background: #ff7675;
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
z-index: -1;
transition: all 0.6s ease;
}
.btn3::before{
width: 100%;
height: 0%;
transform: translate(-50%,-50%) rotate(45deg);
}
.btn3:hover::before{
height: 480%;
}
.btn4::before{
width: 100%;
height: 0%;
transform: translate(-50%,-50%) rotate(-45deg);
}
.btn4:hover::before{
height: 450%;
}
js Code :
var swiper = new Swiper(".mySwiper", {
pagination: {
el: ".swiper-pagination",
},
loop: true,
speed:2000,
autoplay: {
delay: 3000,
disableOnInteraction: false,
waitForTransition: false,
},
effect : 'fade',
fadeEffect: {
crossFade: true,
}
});
边栏推荐
- When easycvr deploys a server cluster, what is the reason why one is online and the other is offline?
- Understanding of strong caching and negotiation caching
- JDBC knowledge
- 记录服务器被入侵病毒:ssh密码被更改登录失败、恶意程序跑满了cpu、jar包启动失败自动kill、一直弹出You have new mail in /var/spool/mail/root
- codeforces每日5题(均1700)-第二天
- 3H proficient in opencv (V) - perspective transformation
- jdbc_ Related codes
- Request header field xxxx is not allowed by Access-Control-Allow-Headers in preflight response问题
- 【TcaplusDB知识库】TcaplusDB运维单据介绍
- Elegant writing controller (parameter verification + unified exception handling)
猜你喜欢

Adobe Premiere基础-不透明度(混合模式)(十二)

Adobe Premiere基础-炫酷文字快闪(十四)

mysql -connector/j驱动下载

国内酒店交易DDD应用与实践——理论篇

Error building sqlsession problem

山东大学项目实训(八)设计轮播图进入页面

Cannot retrieve repository metadata processing records

codeforces每日5题(均1700)-第二天

AMAZING PANDAVERSE:META”无国界,来2.0新征程激活时髦属性

Us judge ruled that the former security director of Uber accused of covering up hacking must face fraud charges
随机推荐
data-*属性用法
Application and practice of DDD in domestic hotel transaction -- Theory
Adobe Premiere Basics - common video effects (cropping, black and white, clip speed, mirroring, lens halo) (XV)
When easycvr deploys a server cluster, what is the reason why one is online and the other is offline?
js文本粒子动态背景
Adobe Premiere foundation - time remapping (10)
Understanding of strong caching and negotiation caching
剑指 Offer 34. 二叉树中和为某一值的路径-dfs法
2022.6.29-----leetcode. five hundred and thirty-five
Longest XOR path (dfs+01trie)
数据分析基础--预测模型
JDBC knowledge
/usr/bin/ld: warning: **libmysqlclient. so. 20**, needed by //usr/
RocketMQ的tag过滤和sql过滤
Anaconda安装并配置jupyter notebook远程
My first experience of remote office | community essay solicitation
Adobe Premiere基础-常用的视频特效(裁剪,黑白,剪辑速度,镜像,镜头光晕)(十五)
MySQL数据库每日备份并定时清理脚本
Adobe Premiere foundation - opacity (mixed mode) (XII)
Jar package background startup and log output