HTML+CSS+JS实现 ❤️响应式图文卡片滑块展示特效❤️

       效果演示:

 

   代码目录:

主要代码实现:

CSS样式:

@import url("https://fonts.googleapis.com/css?family=Quicksand:400,500,700&subset=latin-ext");
html {position: relative;overflow-x: hidden !important;
}body {font-family: "Quicksand", sans-serif;
}a,
a:hover {text-decoration: none;
}.icon {display: inline-block;width: 1em;height: 1em;stroke-width: 0;stroke: currentColor;fill: currentColor;
}.background {position: fixed;width: 100%;height: 100%;left: 0;top: 0;
}.background:after {content: "";position: absolute;top: 0;left: 0;width: 100%;height: 100%;background-image: linear-gradient(45deg, rgba(209, 0, 42, 0.6) 0%, #0E5DC4 100%);opacity: 0.9;
}.background img {width: 100%;height: 100%;object-fit: cover;pointer-events: none;user-select: none;
}.item-bg {width: 300px;height: 500px;position: absolute;top: 30px;background: #fff;border-radius: 10px;box-shadow: 0 6px 26px 6px rgba(0, 0, 0, 0.25);opacity: 0;transition: all 0.3s;left: -30px;
}.item-bg.active {left: 0;top: 0;opacity: 1;
}.news-slider {z-index: 2;max-width: 1300px;margin-left: auto;margin-right: auto;margin-top: 60px;
}@media screen and (max-width: 1300px) {.news-slider {max-width: 1000px;}
}@media screen and (max-width: 576px) {.news-slider {margin-top: 45px;}
}.news-slider__wrp {display: flex;align-items: flex-start;position: relative;z-index: 2;
}.news-slider__item {width: 400px;flex-shrink: 0;
}@media screen and (max-width: 992px) {.news-slider__item {width: 340px;}
}.news-slider__item.swiper-slide {opacity: 0;pointer-events: none;transition: all 0.3s;
}.news-slider__item.swiper-slide-active,
.news-slider__item.swiper-slide-prev,
.news-slider__item.swiper-slide-next {opacity: 1;pointer-events: auto;
}.news-slider__ctr {position: relative;z-index: 12;
}.news-slider__arrow {background: #fff;border: none;display: inline-flex;width: 50px;height: 50px;justify-content: center;align-items: center;box-shadow: 0 6px 26px 6px rgba(0, 0, 0, 0.25);border-radius: 50%;position: absolute;top: 50%;z-index: 12;cursor: pointer;outline: none !important;
}.news-slider__arrow:focus {outline: none !important;
}.news-slider__arrow .icon-font {display: inline-flex;
}.news-slider__arrow.news-slider-prev {left: 15px;transform: translateY(-50%);
}.news-slider__arrow.news-slider-next {right: 15px;transform: translateY(-50%);
}.news-slider__pagination {text-align: center;margin-top: 50px;
}.news-slider__pagination .swiper-pagination-bullet {width: 13px;height: 10px;display: inline-block;background: #fff;opacity: 0.2;margin: 0 5px;border-radius: 20px;transition: opacity 0.5s, background-color 0.5s, width 0.5s;transition-delay: 0.5s, 0.5s, 0s;
}.news-slider__pagination .swiper-pagination-bullet-active {opacity: 1;background: #ffffff;width: 100px;transition-delay: 0s;
}@media screen and (max-width: 576px) {.news-slider__pagination .swiper-pagination-bullet-active {width: 70px;}
}.news__item {padding: 40px;color: #fff;border-radius: 10px;display: block;transition: all 0.3s;
}@media screen and (min-width: 800px) {.news__item:hover {color: #222222;transition-delay: 0.1s;}.news__item:hover .news-date,.news__item:hover .news__title,.news__item:hover .news__txt {opacity: 1;transition-delay: 0.1s;}.news__item:hover .news__img {box-shadow: none;}
}.news__item.active {color: #222222;
}.news__item.active .news-date,
.news__item.active .news__title,
.news__item.active .news__txt {opacity: 1;
}.news__item.active .news__img {box-shadow: none;
}@media screen and (max-width: 992px) {.news__item {padding: 30px;}
}@media screen and (max-width: 576px) {.news__item {padding: 20px;}
}.news-date {padding-bottom: 20px;margin-bottom: 20px;border-bottom: 2px solid;display: inline-block;opacity: 0.7;transition: opacity 0.3s;
}@media screen and (max-width: 576px) {.news-date {margin-bottom: 10px;display: inline-flex;align-items: center;padding-bottom: 0;}
}.news-date__title {display: block;font-size: 32px;margin-bottom: 10px;font-weight: 500;
}@media screen and (max-width: 576px) {.news-date__title {margin-right: 10px;}
}.news-date__txt {font-size: 16px;
}.news__title {font-size: 25px;font-weight: 500;opacity: 0.7;margin-top: 10px;margin-bottom: 15px;transition: opacity 0.3s;
}@media screen and (max-width: 576px) {.news__title {font-size: 22px;margin-bottom: 10px;}
}.news__txt {margin: 10px 0;line-height: 1.6em;font-size: 15px;opacity: 0.7;transition: opacity 0.3s;
}.news__img {border-radius: 10px;box-shadow: 0 6px 26px 6px rgba(0, 0, 0, 0.25);height: 200px;margin-top: 30px;width: 100%;transition: all 0.3s;transform-origin: 0% 0%;
}@media screen and (max-width: 576px) {.news__img {height: 180px;margin-top: 20px;}
}.news__img img {max-width: 100%;border-radius: 10px;height: 100%;width: 100%;
}

部分HTML代码 :

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><title>响应式新闻卡片滑块</title><meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"><link rel='stylesheet' href='css/swiper.min.css'><link rel="stylesheet" href="css/style.css"></head><body><div class="wrapper"><div class="background"><img src="img/b.jpg" alt=""></div><div class="item-bg"></div><div class="news-slider"><div class="news-slider__wrp swiper-wrapper"><div class="news-slider__item swiper-slide"><a href="#" class="news__item"><div class="news-date"> <span class="news-date__title">24</span> <span class="news-date__txt">May</span> </div><div class="news__title">漂亮山水</div><p class="news__txt"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s... </p><div class="news__img"> <img src="img/1.jpg" alt="news"> </div></a></div><div class="news-slider__item swiper-slide"><a href="#" class="news__item"><div class="news-date"> <span class="news-date__title">25</span> <span class="news-date__txt">May</span> </div><div class="news__title">旅游景点</div><p class="news__txt"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s... </p><div class="news__img"> <img src="img/2.jpg" alt="news"> </div></a></div><div class="news-slider__item swiper-slide"><a href="#" class="news__item"><div class="news-date"> <span class="news-date__title">26</span> <span class="news-date__txt">May</span> </div><div class="news__title">景区打卡</div><p class="news__txt"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s... </p><div class="news__img"> <img src="img/3.jpg" alt="news"> </div></a></div><div class="news-slider__item swiper-slide"><a href="#" class="news__item"><div class="news-date"> <span class="news-date__title">27</span> <span class="news-date__txt">May</span> </div><div class="news__title">城市美景</div><p class="news__txt"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s... </p><div class="news__img"> <img src="img/4.jpg" alt="news"> </div></a></div><div class="news-slider__item swiper-slide"><a href="#" class="news__item"><div class="news-date"> <span class="news-date__title">28</span> <span class="news-date__txt">May</span> </div><div class="news__title">旅游景点</div><p class="news__txt"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s... </p><div class="news__img"> <img src="img/5.jpg" alt="news"> </div></a></div><div class="news-slider__item swiper-slide"><a href="#" class="news__item"><div class="news-date"> <span class="news-date__title">29</span> <span class="news-date__txt">May</span> </div><div class="news__title">景区打卡</div><p class="news__txt"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s... </p><div class="news__img"> <img src="img/6.jpg" alt="news"> </div></a></div></div><div class="news-slider__ctr"><div class="news-slider__arrows"><button class="news-slider__arrow news-slider-prev"><span class="icon-font"><svg class="icon icon-arrow-left"><use xlink:href="#icon-arrow-left"></use></svg></span></button><button class="news-slider__arrow news-slider-next"><span class="icon-font"><svg class="icon icon-arrow-right"><use xlink:href="#icon-arrow-right"></use></svg></span></button></div><div class="news-slider__pagination"></div></div></div></div><svg hidden="hidden"><defs><symbol id="icon-arrow-left" viewBox="0 0 32 32"><title>arrow-left</title><path d="M0.704 17.696l9.856 9.856c0.896 0.896 2.432 0.896 3.328 0s0.896-2.432 0-3.328l-5.792-5.856h21.568c1.312 0 2.368-1.056 2.368-2.368s-1.056-2.368-2.368-2.368h-21.568l5.824-5.824c0.896-0.896 0.896-2.432 0-3.328-0.48-0.48-1.088-0.704-1.696-0.704s-1.216 0.224-1.696 0.704l-9.824 9.824c-0.448 0.448-0.704 1.056-0.704 1.696s0.224 1.248 0.704 1.696z"></path></symbol><symbol id="icon-arrow-right" viewBox="0 0 32 32"><title>arrow-right</title><path d="M31.296 14.336l-9.888-9.888c-0.896-0.896-2.432-0.896-3.328 0s-0.896 2.432 0 3.328l5.824 5.856h-21.536c-1.312 0-2.368 1.056-2.368 2.368s1.056 2.368 2.368 2.368h21.568l-5.856 5.824c-0.896 0.896-0.896 2.432 0 3.328 0.48 0.48 1.088 0.704 1.696 0.704s1.216-0.224 1.696-0.704l9.824-9.824c0.448-0.448 0.704-1.056 0.704-1.696s-0.224-1.248-0.704-1.664z"></path></symbol></defs>
</svg><script src="js/jquery.min.js"></script><script src='js/swiper.min.js'></script><script src="js/script.js"></script></body></html>

上面的img图片和jquery.min.js等需要引入即可运行

源码获取

精彩推荐更新中:

HTML5大作业实战100套

  打卡 文章 更新  37  /  100天

大家可以点赞、收藏、关注、评论我啦 、需要完整文件随时联系我或交流哟~!

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/562091.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

代码写好了怎么在php里裕兴_8 行代码用Python画一个中国地图

源 / SegmentFaultJupyter首先&#xff0c;第一神器是Jupyter。如果你是第一次使用&#xff0c;可能搞不清楚它的开发者做这么个鬼东西出来干什么&#xff0c;说它是博客系统也不像&#xff0c;说它是web服务器也不像&#xff0c;但它就是有用。因为我们传统的web开发首先想的就…

❤️六W字《计算机基础知识》(三)(建议收藏)❤️

推荐阅读&#xff1a; ❤️《计算机基础知识》&#xff08;一&#xff09;&#xff08;建议收藏&#xff09;❤️ ❤️《计算机基础知识》&#xff08;二&#xff09;&#xff08;建议收藏&#xff09;❤️ ❤️ java项目精品实战案例 ❤️ 101. Internet上&#xff0c;访问We…

源码 状态机_阿里中间件seata源码剖析七:saga模式实现

saga模式是分布式事务中使用比较多的一种模式&#xff0c;他主要应用在长流程的服务&#xff0c;对一个全局事务&#xff0c;如果某个节点抛出了异常&#xff0c;则从这个节点往前依次回滚或补偿事务。今天我们就来看看它的源码实现。状态机初始化在之前的文章《springcloudeur…

❤️六W字《计算机基础知识》(四)(建议收藏)❤️

151. www.cernet.edu.cn 的网址中&#xff0c;可以明确地看出是属于哪一类机构____。 A、教育界 B、政府单位 C、法人组织 D、公司 152. 在Wed网页中指向其他网页的‘指针“称之为____。 A、超链接 B、超文本 C、超媒体 D、多媒体 153. 下列关于URL的解释错误的是____。…

❤️六W字《计算机基础知识》(五)(建议收藏)❤️

客户/服务器模式的局域网&#xff0c;其网络硬件主要包括服务器、工作站、网卡和____。 A、网络拓扑结构 B、计算机 C、传输介质 D、网络协议 和广域网相比&#xff0c;局域网____。 A、有效性好但可靠性差 B、有效性差但可靠性高 C、有效性好可靠性也高 …

唯有自己变得强大_唯有自己变得强大,才能获得有用人脉!

孔子说&#xff1a;不患人之莫知己&#xff0c;求为可知也来源&#xff1a;田俊国课堂对初入职场的人来讲人微言轻&#xff0c;即便使出浑身解数去拓展关系&#xff0c;有权力、有地位的人也未必正眼瞧你。全世界的人都想巴结那些炙手可热的有权力、有资源的名人。问题是&#…

❤️六W字《计算机基础知识》(六)(建议收藏)❤️

FTP是因特网上最早使用的文件传输程序&#xff0c;使用FTP不能____。 A、查看文件 B、文件目录操作 C、下载文件 D、运行文件 WWW是一种建立在Internet上的全球性的、交互的、动态、多平台、分布式的图形信息系统&#xff0c;它的…

android sdk方法隐藏_每个Android开发都必须知道的利器

1.背景介绍在移动端项目功能不断完善和丰富的过程中我们一直在寻找一种可以高效开发且复用率高的开发模式&#xff0c;特别是多应用同步开发、管理。在开发过程中你是否遇到需要发布影子工程&#xff1f;新建项目是否需要耗费大量时间将原有基类、工具类、第三方通用类库逐个 c…

❤️六W字《计算机基础知识》(七)(建议收藏)❤️

在Word中&#xff0c;对某个段落的全部文字进行下列设置&#xff0c;属于段落格式设置的是____。 A、设置为四号字 B、设置为楷体字 C、设置为1.5倍行距 D、设置为4磅字间距 用Word编辑文件时&#xff0c;用户可以设置文件的自动保存时间间隔。如果改变自动保存时…

flash 火狐总是崩溃_win10系统火狐flash插件总是崩溃的解决方法

win10系统火狐flash插件总是崩溃的问题发生概率较高。怎样来处理win10系统火狐flash插件总是崩溃的问题&#xff0c;知道的人估计不多。本站针对win10系统火狐flash插件总是崩溃的情况总结了一些解决的方法。简单说两步&#xff1a;1、在火狐浏览器地址栏在输入&#xff1a;abo…

❤️六W字《计算机基础知识》(八)(建议收藏)❤️

在Word中替换的快捷键是____。 A、CTRLF B、CTRLH C、CTRLS D、CTRLP 在Word中打印的快捷键是____。 A、CTRLF B、CTRLH C、CTRLO D、CTRLP 在Word中打开新文档的快捷键是____。 A、CTRLF B、CTRLH C、CTRLO D、CTRLP 在Word中&#xff0c;___最大。 A、初…

s3vm与tritraining_S3FD论文解读

论文题目&#xff1a;S3FD: Single Shot Scale-invariant Face DetectorS$^3$FD: Single Shot Scale-invariant Face Detector​arxiv.orgsfzhang15/SFD​github.com作者团队&#xff0c;来自于中科院自动化所(CASIA)&#xff0c;一作Shifeng Zhang(张士峰)&#xff0c;看见没&…

❤️六W字《计算机基础知识》(九)(建议收藏)❤️

在PowerPoint2000中&#xff0c;若为幻灯片中的对象设置"飞入"&#xff0c;应选择对话框____。 A、自定义动画 B、幻灯片版式 C、自定义放映 D、幻灯处放映 在编辑Word文档时&#xff0c;输入的新字符总是覆盖了文档中已经输入的字符&#xff0c;_____。 A、原因是…

mysql怎么创建表_mysql怎么创建一个表

1.登陆成功后&#xff0c;首先进入某一个数据库 (不是指数据库服务器)use t1; //t1是数据库名如图所示&#xff1a;2.在此数据库中建立数据库表2.1 先建立表结构(可以理解为表的列名&#xff0c;也就是字段名)在实际生产过程中&#xff0c;表结构是需要经过精心设计的。通用的语…

❤️1000道《计算机基础知识》汇总上----(建议收藏)❤️

1、 世界上首先实现存储程序的电子数字计算机是____。 A、ENIAC B、UNIVAC C、EDVAC D、EDSAC 2、计算机科学的奠基人是____。 A、查尔斯.巴贝奇 B、图灵 C、阿塔诺索夫 D、冯.诺依曼 3、 世界上首次提出存储程序计算机体系结构的是____。 A、艾仑•图灵 B、冯•诺…

HTML+CSS+JS实现 ❤️乐队成员图片展示ui特效❤️

效果演示&#xff1a; 代码目录&#xff1a; 主要代码实现&#xff1a; CSS样式&#xff1a; charset "utf-8"; /* CSS rest */body {font-size: 12px;font-family: "微软雅黑"; }* {margin: 0;padding: 0; }a {text-decoration: none; }ul, li, ol {list…

centos mysql 服务器_服务器数据库搭建流程(CentOs+mysql)

前言&#xff1a;服务器上数据库搭建需要知道Linux系统的版本&#xff0c;以前的Ubuntu14.04直接在终端下输入apt-get install (package)便可方便的下载并安装mysql&#xff0c;但是在centOs上就是行不通的&#xff0c;需要复杂的配置&#xff0c;不过在centOs里可以使用yum in…

HTML+CSS+JS实现 ❤️电商商品图片幻灯片特效❤️

效果演示&#xff1a; 代码目录&#xff1a; 主要代码实现&#xff1a; CSS样式&#xff1a; *, *::after, *::before {box-sizing: border-box; }html {background: #fff; }body {--color-text: #000;--color-bg: #fff;--color-link: #000;--color-link-hover: #858585;--col…

HTML+CSS+JS实现 ❤️响应式团队❤️

效果演示&#xff1a; 代码目录&#xff1a; 主要代码实现&#xff1a; CSS样式&#xff1a; body {margin: 0;min-height: 100vh;display: flex;justify-content: center;align-items: center;background-color: #f7f7f7; }.section-heading {font-family: "Dancing Scr…

canal mysql5.6_超详细的Canal入门,看这篇就够了!

思维导图文章已收录Github精选&#xff0c;欢迎Star&#xff1a;https://github.com/yehongzhi/learningSummary前言我们都知道一个系统最重要的是数据&#xff0c;数据是保存在数据库里。但是很多时候不单止要保存在数据库中&#xff0c;还要同步保存到Elastic Search、HBase、…