国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

vue卡片輪播圖

這篇具有很好參考價(jià)值的文章主要介紹了vue卡片輪播圖。希望對大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

vue卡片輪播圖,Vue,vue.js
我的項(xiàng)目是vue3的,用的swiper8文章來源地址http://www.zghlxwxcb.cn/news/detail-623799.html

	<template>
       <div class="tab-all">
          <div class="tab-four">
            <swiper
              :loop="true"
              :autoplay="{
                disableOnInteraction:false,
                delay:3000
              }"
              :slides-per-view="3"
              :centered-slides="true"
              :modules="modules"
            >
              <swiper-slide v-for="(item,index) in fourList" :key="index">
                <img :src="item.imgurl">
                <div class="bot-text">
                  <span>{{ item.act }}</span>
                </div>
              </swiper-slide>
            </swiper>
          </div>
       </div>
    </template>
    <script>
    import { Swiper, SwiperSlide } from 'swiper/vue/swiper-vue';
	import { Autoplay, Scrollbar } from 'swiper';
	import 'swiper/swiper-bundle.min.css';
	export default defineComponent({
	  components: {
	    Swiper,
	    SwiperSlide,
	  },
	  setup(){ 
	    const fourList = [
		  {imgurl: require('@/assets/mImage/joinus/OIP.jpg'), act: '風(fēng)景' }, 
		  {imgurl: require('@/assets/mImage/joinus/OIP1.jpg'), act: '風(fēng)景' }, 
		  {imgurl: require('@/assets/mImage/joinus/OIP2.jpg'), act: '風(fēng)景'}, 
		  {imgurl: require('@/assets/mImage/joinus/OIP3.jpg'), act: '風(fēng)景'}, 
		  {imgurl: require('@/assets/mImage/joinus/OIP4.jpg'), act: '小貓'}, 
		],
	    return {
	      modules: [ Autoplay, Scrollbar], fourList
	    }
	  }
	})
	<style lang='scss' scoped>
		.tab-all {
	        width: 100%;
	        color: rgb(255, 255, 255);
	        .swiper {
	          padding-top: 1.5rem;
	          width: 100%;
	          height: 9.6154rem;
	        }
	        img{
	          width: 5.268rem;
	          height: 7rem;
	          display: block;
	          border-radius: .1538rem;
	          transition: all 0.5s;
	          -webkit-transition: all 0.5s;
	        }
	        /deep/ .swiper-slide{
	          position: relative;
	          border-radius: .2308rem;
	          overflow: hidden;
	          height: 7rem;
	          &::after{
	            content: '';
	            left: 0;
	            top: 0;
	            width: 5.268rem;
	            height: 7rem;
	            background: rgba($color: #000000, $alpha: 0.4);
	            z-index: 11;
	            position: absolute;
	          }
	        }
	        /deep/ .swiper-slide-active{
	          position: relative;
	          overflow: visible;
	          z-index: 11;
	          padding: .0769rem;
	          height: 8rem;
	          &>img{
	            border-radius: .3rem;
	            transform: scale(1.3);
	            -webkit-transform: scale(1.3);
	            transform-origin: center !important;
	            -webkit-transform-origin:center !important;
	            position: absolute;
	            left: 0;
	          }
	          z-index: 111;
	          &::after{
	            display: none;
	          }
	        }
	        .tab-four {
	          width: 100%;
	          .bot-text {
	            height: 1.4rem;
	            width: 5.268rem;
	            transform: scale(1.3);
	            -webkit-transform: scale(1.3);
	            transform-origin: center !important;
	            -webkit-transform-origin:center !important;
	            position: absolute;
	            left: 0;
	            bottom: 0;
	            background: linear-gradient(180deg, rgba(39,56,56,0.4) 0%, rgba(4, 19, 32, 0.4) 100%);
	            backdrop-filter: blur(6px);
	            display: flex;
	            justify-content: center;
	            align-items: center;
	            border-radius: 0 0 .2rem .2rem;
	            &>span {
	              margin-left: .3077rem;
	              display: inline-block;
	              font-size: .45rem;
	              line-height: .6rem;
	              font-family: PingFangSC-Semibold, PingFang SC;
	            }
	          }
	          .swiper-slide-active{
	            &>img{
	              border: none;
	              border-radius: 0;
	              padding: 0;
	            }
	          }
	        }
      }
	</style>

到了這里,關(guān)于vue卡片輪播圖的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Vue 實(shí)現(xiàn)輪播圖功能

    Vue 實(shí)現(xiàn)輪播圖功能

    Vue 是一款流行的前端框架,它提供了一系列的工具和組件,使得開發(fā)者可以更加便捷地創(chuàng)建交互式的 Web 應(yīng)用程序。輪播圖是 Web 應(yīng)用程序中常見的一種交互式組件,可以用來展示圖片、新聞、廣告等內(nèi)容。在 Vue 中,我們可以使用第三方組件庫或自己編寫代碼來實(shí)現(xiàn)輪播圖功

    2024年02月05日
    瀏覽(19)
  • vue中swiper輪播圖的使用

    說明:導(dǎo)入相應(yīng)js引css import \\\"Swiper\\\" from \\\"swiper\\\" import \\\"swiper/css/swiper.css\\\"; import \\\"swiper/js/swiper\\\"; 說明:必要的結(jié)構(gòu)使用;直接封裝成一個(gè)組件? 說明:(頁面當(dāng)中務(wù)必要有結(jié)構(gòu));注釋已經(jīng)寫入代碼。 第一:可以解決獲取數(shù)據(jù)在Swiper實(shí)例之前;第二:可以解決v-for遍歷完后在Swiper之

    2024年02月14日
    瀏覽(26)
  • Vue2+swiper基礎(chǔ)實(shí)現(xiàn)輪播圖

    Vue2+swiper基礎(chǔ)實(shí)現(xiàn)輪播圖

    提示:文章寫完后,目錄可以自動生成,如何生成可參考右邊的幫助文檔 swiper的基礎(chǔ)使用 提示:以下是本篇文章正文內(nèi)容,下面案例可供參考 Swiper中文網(wǎng)-輪播圖幻燈片js插件,H5頁面前端開發(fā) ? ? ? ? 注意:我們用的是vue2所以推薦大家下載swiper5版本 示例: 查看安裝是否完成

    2024年01月16日
    瀏覽(91)
  • vue項(xiàng)目中使用vant輪播圖組件(桌面端)

    vue項(xiàng)目中使用vant輪播圖組件(桌面端)

    vue使用vant輪播圖組件(桌面端) 2.1 Visual Studio Code 1.75.0 2.2 chrome瀏覽器 2.3 node v18.14.0 3.1 安裝環(huán)境 3.2 添加代碼 3.3 結(jié)果展示 4.1 安裝環(huán)境 先安裝包 然后桌面端適配 4.2 添加代碼 注冊組件 相比于官方給的代碼,有兩個(gè)方面需要注意,一個(gè)是適配桌面端,還有一個(gè)就是我以為vant組

    2024年02月04日
    瀏覽(34)
  • 前端Vue自定義輪播圖視頻播放組件 仿京東商品詳情輪播圖視頻Video播放效果 可圖片預(yù)覽

    前端Vue自定義輪播圖視頻播放組件 仿京東商品詳情輪播圖視頻Video播放效果 可圖片預(yù)覽

    隨著技術(shù)的發(fā)展,開發(fā)的復(fù)雜度也越來越高,傳統(tǒng)開發(fā)方式將一個(gè)系統(tǒng)做成了整塊應(yīng)用,經(jīng)常出現(xiàn)的情況就是一個(gè)小小的改動或者一個(gè)小功能的增加可能會引起整體邏輯的修改,造成牽一發(fā)而動全身。通過組件化開發(fā),可以有效實(shí)現(xiàn)單獨(dú)開發(fā),單獨(dú)維護(hù),而且他們之間可以隨

    2024年02月15日
    瀏覽(27)
  • 在vue中使用swiper輪播圖(搭配watch和$nextTick())

    在vue中使用swiper輪播圖(搭配watch和$nextTick())

    在組件中使用輪播圖展示圖片信息: 1.下載swiper,5版本為穩(wěn)定版本 cnpm install swiper@5 2.在組件中引入swiper包和對應(yīng)樣式,若多組件使用swiper,可以把swiper引入到main.js入口文件中: import \\\'swiper/css/swiper.css\\\' //引入swiper樣式 import Swiper from \\\'swiper\\\'; //引入swiper ?3.在組件中使用: 由于我

    2024年02月13日
    瀏覽(22)
  • vue3自定義封裝組件:消息提示、輪播圖、加載更多、骨架屏組件

    定義組件:src/components/library/xtx-infinite-loading.vue 注冊組件:src/components/library/index.js ?引用組件:src/main.js 使用組件: .vue文件 首先是輪播圖的樣式:src/components/library/xtx-carousel.vue? 然后是輪播圖的結(jié)構(gòu)與邏輯封裝:src/components/library/xtx-carousel.vue 插件注冊:src/components/library

    2024年02月12日
    瀏覽(17)
  • vue2 el-carousel輪播圖和文字一起改變

    vue2 el-carousel輪播圖和文字一起改變

    vue項(xiàng)目的話 安裝一下element依賴 在 main 入口文件引入element包 我在app文件里邊去寫的

    2024年02月14日
    瀏覽(15)
  • vue3 實(shí)現(xiàn)門戶網(wǎng)站頁面鼠標(biāo)滾輪控制頁面上下滾動---類似輪播圖

    案例參考:首頁_CNESA 儲能研究平臺 //監(jiān)聽鼠標(biāo)滾動事件 ?window.addEventListener(\\\'mousewheel\\\', debounce(methodB,300), true)||window.addEventListener(\\\"DOMMouseScroll\\\",debounce(methodB,300),false) const debounce = (func, wait) ={ ? ? ? ? let timeout; ? ? ? ? return ?function() { ? ? ? ? ? ? let context = this; ? ? ? ? ? ?

    2024年02月12日
    瀏覽(172)
  • vue 實(shí)現(xiàn)釘釘官網(wǎng)的輪播圖下面功能滾動排版CSS效果

    前言 最近在寫PC端的業(yè)主端時(shí)候,發(fā)現(xiàn)傳統(tǒng)的菜單欄比較丑,也不符合實(shí)際應(yīng)用(功能頁面并不多-展示為主) 偶然發(fā)現(xiàn)釘釘官網(wǎng)的效果挺有意思的,想著把這個(gè)效果復(fù)原過來,然后夸夸搜索了一番。 經(jīng)過一頓的cv打法,加上修修補(bǔ)補(bǔ)把大概的效果整了出來,時(shí)間關(guān)系最基礎(chǔ)

    2024年02月11日
    瀏覽(99)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包