做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

Vue.js實現(xiàn)按鈕的動態(tài)綁定效果及實現(xiàn)代碼

來源:懂視網(wǎng) 責編:小采 時間:2020-11-27 22:32:01
文檔

Vue.js實現(xiàn)按鈕的動態(tài)綁定效果及實現(xiàn)代碼

Vue.js實現(xiàn)按鈕的動態(tài)綁定效果及實現(xiàn)代碼:實現(xiàn)效果: 實現(xiàn)代碼以及注釋: <!DOCTYPE html> <html> <head> <title>按鈕綁定</title> <meta charset=utf-8> <meta http-equiv=X-UA-Compatible conten
推薦度:
導讀Vue.js實現(xiàn)按鈕的動態(tài)綁定效果及實現(xiàn)代碼:實現(xiàn)效果: 實現(xiàn)代碼以及注釋: <!DOCTYPE html> <html> <head> <title>按鈕綁定</title> <meta charset=utf-8> <meta http-equiv=X-UA-Compatible conten

實現(xiàn)效果:

實現(xiàn)代碼以及注釋:

<!DOCTYPE html>
<html>
<head>
 <title>按鈕綁定</title>
 <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <style type="text/css">
 *{
 margin: 0;
 padding: 0;
 }
 body{
 font: 15px/1.3 'Open Sans', sans-serif;
 color: #5e5b64;
 text-align: center;
 }
 a, a:visited{
 outline: none;
 color: #3b9dc1;
 }
 a:hover{
 text-decoration: none;
 }
 section, footer, header, aside, nav{
 display: block;
 }
 /* 菜單欄 */
 nav{
 display: inline-block;
 margin: 60px auto 45px;
 background-color: #5597b4;
 box-shadow: 0 1px 1px #ccc;
 border-radius: 2px;
 }
 nav a{
 display: inline-block;
 padding: 18px 30px;
 color: #fff !important;
 font-weight: bold;
 font-size: 16px;
 text-decoration: none !important;
 line-height: 1;
 text-transform: uppercase;
 background-color: transparent;
 -webkit-transition:background-color 0.25s;
 z-index: moz-transition:background-color 0.25s;
 transition:background-color 0.25s;
 }
 nav a:first-child{
 border-radius:2px 0 0 2px;
 }
 nav a:last-child{
 border-radius:0 2px 2px 0;
 }
 nav.home .home,
 nav.projects .projects,
 nav.services .services,
 nav.contact .contact{
 background-color:#e35885;
 }
 p{
 font-size:22px;
 font-weight:bold;
 color:#7d9098;
 }
 p b{
 color:#ffffff;
 display:inline-block;
 padding:5px 10px;
 background-color:#c4d7e0;
 border-radius:2px;
 text-transform:uppercase;
 font-size:18px;
 }
 </style>
</head>
<body>
<div id="main">
 <!--導航欄菜單會得到處于active的變量的值作為一個class -->
 <!-- 為了防止當我們點擊鏈接時頁面發(fā)生跳轉(zhuǎn),我們使用prevent優(yōu)化 -->
 <nav v-bind:class="active" v-on:click.prevent>
 <!-- 當一個菜單中的鏈接被點擊,我們調(diào)用定義在javaScript vue中的makeActive方法 -->
 <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="home" v-on:click="makeActive('home')">Home</a>
 <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="projects" v-on:click="makeActive('projects')">Projects</a>
 <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="services" v-on:click="makeActive('services')">Services</a>
 <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="contact" v-on:click="makeActive('contact')">Contact</a>
 </nav>
 <!-- mustache表達式將被active的值替換,它將發(fā)生任何變化它都將會自動更新-->
 <p>YOU SELECTED <b>{{active}}</b></p>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.5/vue.min.js"></script>
<script type="text/javascript">
 // 創(chuàng)建一個Vue示例,并且傳遞一個可選對象
 var demo = new Vue({
 // 一個DOM元素表示我們的view模型
 el: '#main',
 // 定義屬性值,給定初始化值
 data: {
 active: 'home'
 },
 // 我們需要使用到的函數(shù)
 methods: {
 makeActive: function(item){
 // 當一個model發(fā)生變化,view會自動更新
 this.active = item;
 }
 }
 });
</script>
</body>
</html>

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

Vue.js實現(xiàn)按鈕的動態(tài)綁定效果及實現(xiàn)代碼

Vue.js實現(xiàn)按鈕的動態(tài)綁定效果及實現(xiàn)代碼:實現(xiàn)效果: 實現(xiàn)代碼以及注釋: <!DOCTYPE html> <html> <head> <title>按鈕綁定</title> <meta charset=utf-8> <meta http-equiv=X-UA-Compatible conten
推薦度:
標簽: 綁定 VUE 動態(tài)
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 澄迈县| 东海县| 绥棱县| 肃南| 米泉市| 绥芬河市| 吴川市| 乌苏市| 庄河市| 申扎县| 光山县| 会东县| 堆龙德庆县| 名山县| 嵩明县| 吐鲁番市| 罗城| 朝阳市| 根河市| 昌图县| 华阴市| 洛南县| 澄江县| 许昌市| 灵璧县| 集贤县| 闸北区| 腾冲县| 灌南县| 江孜县| 田阳县| 南宁市| 漯河市| 昌吉市| 岳池县| 罗田县| 佳木斯市| 白银市| 永胜县| 安图县| 东乡族自治县|