当前位置: 首页 > news >正文

国外有哪些做建筑材料的网站建站哪家好 phpwind

国外有哪些做建筑材料的网站,建站哪家好 phpwind,福州网站建设服务商,python开发微信小程序这里的绑定其实就是v-bind的绑定#xff0c;如代码所示#xff0c;div后面的引号就是v-bind绑定#xff0c;然后大括号将整个对象括起来#xff0c;对象内先是属性#xff0c;属性后接的是变量#xff0c;这个变量是定义在script中的#xff0c;后通过这个变量#xff…这里的绑定其实就是v-bind的绑定如代码所示div后面的引号就是v-bind绑定然后大括号将整个对象括起来对象内先是属性属性后接的是变量这个变量是定义在script中的后通过这个变量来控制属性实现绑定。 先设置个盒子并为其设置style样式代码如下 templateviewviewimage :srcpicurl/image/view/viewbutton :loadingfalse按钮/buttonview classbox/view /templatescript setupimport { ref } from vue;const arrs ref([../../static/pic1.png,../../static/pic2.png,../../static/pic3.webp,../../static/pic4.jpg]) ;const picurl ref(../../static/pic1.png) ;const isactive ref(false)const Size ref(30) ;let i 0 ; //这个值不在模板层渲染可以不用refsetInterval((){i ;Size.value i ;isactive.value !isactive.valuepicurl.value arrs.value[i%4] ;},1000) /scriptstyle langscss .box{width: 200px;height: 200px;background: orange; } .active{background: green; //下面的CSS可以覆盖上面的color: white; } /style 效果如下 再添加一个类名为其设置样式也就是说用两个类名作用于同一个盒子。继续在盒子中添加文字设置字体大小代码如下 templateviewviewimage :srcpicurl/image/view/viewbutton :loadingfalse按钮/buttonview classbox activev-bind指令/view /templatescript setupimport { ref } from vue;const arrs ref([../../static/pic1.png,../../static/pic2.png,../../static/pic3.webp,../../static/pic4.jpg]) ;const picurl ref(../../static/pic1.png) ;const isactive ref(false)const Size ref(30) ;let i 0 ; //这个值不在模板层渲染可以不用refsetInterval((){i ;Size.value i ;isactive.value !isactive.valuepicurl.value arrs.value[i%4] ;},1000) /scriptstyle langscss .box{width: 200px;height: 200px;background: orange;font-size: 20px; } .active{background: green; //下面的CSS可以覆盖上面的color: white; } /style 效果如下 如图所示现在实现了两个类名共同作用于一个类名且在两个类名定义相同属性的情况下下方的样式会优先作用于类。 现在尝试把active变成动态的值先删掉之前定义的active现在用v-bind形式定义active代码如下 templateviewviewimage :srcpicurl/image/view/viewbutton :loadingfalse按钮/buttonview classbox :class activev-bind指令/view /templatescript setupimport { ref } from vue;const arrs ref([../../static/pic1.png,../../static/pic2.png,../../static/pic3.webp,../../static/pic4.jpg]) ;const picurl ref(../../static/pic1.png) ;const isactive ref(false)const Size ref(30) ;let i 0 ; //这个值不在模板层渲染可以不用refsetInterval((){i ;Size.value i ;isactive.value !isactive.valuepicurl.value arrs.value[i%4] ;},1000) /scriptstyle langscss .box{width: 200px;height: 200px;background: orange;font-size: 20px; } .active{background: green; //下面的CSS可以覆盖上面的color: white; } /style 这里的显示效果和刚刚的效果相同。这里请注意定义active时的格式尤其是在使用动态绑定要加上一个单引号以表示它是字符串类型的类名否则没法作用上的。 接下来尝试用一个值来控制active代码如下 templateviewviewimage :srcpicurl/image/view/viewbutton :loadingfalse按钮/buttonview classbox :class {active:true}v-bind指令/view /templatescript setupimport { ref } from vue;const arrs ref([../../static/pic1.png,../../static/pic2.png,../../static/pic3.webp,../../static/pic4.jpg]) ;const picurl ref(../../static/pic1.png) ;const isactive ref(false)const Size ref(30) ;let i 0 ; //这个值不在模板层渲染可以不用refsetInterval((){i ;Size.value i ;isactive.value !isactive.valuepicurl.value arrs.value[i%4] ;},1000) /scriptstyle langscss .box{width: 200px;height: 200px;background: orange;font-size: 20px; } .active{background: green; //下面的CSS可以覆盖上面的color: white; } /style 如开头所说的这里用大括号将整个对象括起来对象内包含了属性active属性后接的是变量可以写上true或者false以控制active这里我们用的是true效果如下 还可以将这个变量定义在script中后通过这个变量来控制属性实现绑定这里我们定义变量为false记住一定要用ref来定义代码如下 templateviewviewimage :srcpicurl/image/view/viewbutton :loadingfalse按钮/buttonview classbox :class {active:isactive}v-bind指令/view /templatescript setupimport { ref } from vue;const arrs ref([../../static/pic1.png,../../static/pic2.png,../../static/pic3.webp,../../static/pic4.jpg]) ;const picurl ref(../../static/pic1.png) ;const isactive ref(false) /scriptstyle langscss .box{width: 200px;height: 200px;background: orange;font-size: 20px; } .active{background: green; //下面的CSS可以覆盖上面的color: white; } /style 效果如下 这是一种方法 日常使用中还可以使用三元表达式来控制active代码如下 templateviewviewimage :srcpicurl/image/view/viewbutton :loadingfalse按钮/buttonview classbox :class true?active : v-bind指令/view /templatescript setupimport { ref } from vue;const arrs ref([../../static/pic1.png,../../static/pic2.png,../../static/pic3.webp,../../static/pic4.jpg]) ;const picurl ref(../../static/pic1.png) ;const isactive ref(true) /scriptstyle langscss .box{width: 200px;height: 200px;background: orange;font-size: 20px; } .active{background: green; //下面的CSS可以覆盖上面的color: white; } /style 当然三元表达式的判断条件也可以填入刚刚设置的isactive变量。 接下来把变量放入定时器让其动态改变代码如下 templateviewviewimage :srcpicurl/image/view/viewbutton :loadingfalse按钮/buttonview classbox :class {active:isactive}v-bind指令/viewview calssbox :class isactive?active:box/view /templatescript setupimport { ref } from vue;setInterval((){isactive.value !isactive.value},1000)const arrs ref([../../static/pic1.png,../../static/pic2.png,../../static/pic3.webp,../../static/pic4.jpg]) ;const picurl ref(../../static/pic1.png) ;const isactive ref(true) /scriptstyle langscss .box{width: 200px;height: 200px;background: orange;font-size: 20px; } .active{width: 200px;height: 200px;background: green; //下面的CSS可以覆盖上面的color: white; } /style 成功 以上两种都是常用的方式接下来演示一下内联的样式先写个简单的内联样式设置第二个box的宽度要注意的是内联样式的权重更高会覆盖其他样式代码如下 templateviewviewimage :srcpicurl/image/view/viewbutton :loadingfalse按钮/buttonview classbox :class {active:isactive}v-bind指令/view!-- view calssbox :class isactive?active:box/view --view classbox style width: 300px;内联样式/view /templatescript setupimport { ref } from vue;setInterval((){isactive.value !isactive.value},1000)const arrs ref([../../static/pic1.png,../../static/pic2.png,../../static/pic3.webp,../../static/pic4.jpg]) ;const picurl ref(../../static/pic1.png) ;const isactive ref(true) /scriptstyle langscss .box{width: 200px;height: 200px;background: orange;font-size: 20px; } .active{width: 200px;height: 200px;background: green; //下面的CSS可以覆盖上面的color: white; } /style 效果如下 如果要使用变量就需要在style的前面加上冒号并以对象的形式定义刚刚定义了宽度要用单引号括起来代码如下 templateviewviewimage :srcpicurl/image/view/viewbutton :loadingfalse按钮/buttonview classbox :class {active:isactive}v-bind指令/view!-- view calssbox :class isactive?active:box/view --view classbox :style {width:300px}内联样式/view /templatescript setupimport { ref } from vue;setInterval((){isactive.value !isactive.value},1000)const arrs ref([../../static/pic1.png,../../static/pic2.png,../../static/pic3.webp,../../static/pic4.jpg]) ;const picurl ref(../../static/pic1.png) ;const isactive ref(true) /scriptstyle langscss .box{width: 200px;height: 200px;background: orange;font-size: 20px; } .active{width: 200px;height: 200px;background: green; //下面的CSS可以覆盖上面的color: white; } /style 或者用数字‘单位’(例260 ‘px’ )这样的形式写出也是可以的。 通过内联也可以实现动态变量将字体大小定义为数字 ‘单位’的形式然后用变量替换掉数字并将其放入定时器中代码如下 templateviewviewimage :srcpicurl/image/view/viewbutton :loadingfalse按钮/buttonview classbox :class {active:isactive}v-bind指令/view!-- view calssbox :class isactive?active:box/view --view classbox :style {width:300px,height:260 px,fontSize:fontsize px}内联样式/view /templatescript setupimport { ref } from vue;let i 0 ;let fontsize ref(30) ;setInterval((){isactive.value !isactive.valuei ; fontsize.value i ;},1000)const arrs ref([../../static/pic1.png,../../static/pic2.png,../../static/pic3.webp,../../static/pic4.jpg]) ;const picurl ref(../../static/pic1.png) ;const isactive ref(true) /scriptstyle langscss .box{width: 200px;height: 200px;background: orange;font-size: 20px; } .active{width: 200px;height: 200px;background: green; //下面的CSS可以覆盖上面的color: white; } /style 效果如下
http://www.hkea.cn/news/14372930/

相关文章:

  • 网站专栏建设浏览网站内下载文件
  • 怎么做物流网站代理seo网络培训机构
  • 淘宝联盟推广网站怎么做网站建设 昆明邦凯网络
  • 淘宝开放平台怎么做淘宝客网站wordpress中文问题
  • 上海网站建设联系方式移动应用开发网站
  • 做网站做哪个行业好龙岗品牌网站建设
  • 网站报名系统怎么做wordpress 三栏制作
  • 个人网站怎么填写服装怎么做网站推广
  • 网站策划案模板网站模板代码怎么写
  • 网站开发人员岗位分布说明旅游官网
  • 网站建设合同内容做直播网站要哪些技术
  • qq群推广引流免费网站更改wordpress默认登录后台
  • 网站产品内页设计网站即将 模板
  • 大型电商网站建设公司商贸公司商标logo设计
  • 口碑好的网站建设网站建设自学多长时间
  • wordpress中文伪静态北京网站关键词优化推荐
  • 郑州网站建设公司招聘西安优秀的集团门户网站建设
  • 如何做考试网站邵阳网站建设的话术
  • 哪些网站seo做的好旅游网页设计模板简约图片
  • 成都网站建设设计公司排名dedecms 网站地图 模板
  • 商城县优化wordpress评论
  • 安徽天筑建设集团网站泉州建设网站
  • 有没有帮忙做网站为什么要建设网站
  • html网页模板制作企业网站优化费用
  • 医院网站建设的意义房屋设计装修软件免费app
  • 大连网站制作仟亿科技软件界面设计文档
  • 河南商务网站建设景观平台设计
  • 做网站准备内容wordpress 模板 学校
  • 网页一键建站云南营造建设有限公司网站
  • 做二手家电网站怎样个人模板网站