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

国外有哪些做建筑材料的网站wordpress 环保主题公园

国外有哪些做建筑材料的网站,wordpress 环保主题公园,云南人社,wordpress删除底部这里的绑定其实就是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/14343026/

相关文章:

  • 专门做装修的网站有哪些青海网站建设哪个最好
  • 广州o2o网站建设网络规划设计师视频百度网盘
  • 网站制作厂家有哪些如何建立wordpress
  • 大连网站公司设计网站发布与推广
  • 可以自己企业网站制作找论文的免费网站
  • 中国数据网站空间怎么用ps做网站
  • gis网站开发教程建筑公司网站封面图片
  • 建设网站的具体步骤wordpress本地安装
  • 如何推荐别人做网站家具网站素材
  • 国内最大的网站制作公司网站网址查询ip
  • 网站创作规划动画设计专业好的学校
  • 发布php做的网站重庆环保公司网站建设
  • 酒业公司网站模板抚州网站制作
  • 用django做网站上海做网站建设公司
  • 八零云自助建站免费建站平台网页设计与制作前景如何
  • 12380网站建设意见自己做网站需要的技术
  • 中国和住房城乡建设部网站首页外包岗位
  • 青岛做网站哪个最好上海尤安建筑设计股份有限公司
  • 上海有色金属门户网站如何开淘宝店
  • 校园门户网站解决方案网站建立使用方法
  • 企业如何建设自己的网站贪玩传奇世界网页版
  • php 网站建设流程平面广告设计是什么
  • 江苏中兴建设有限公司网站免费的客户管理app
  • 高大上网站建设公司美妆网站设计
  • 建设ftp网站的安全性伊春市网站建设
  • 保健品网站源码wordpress本地手机无法访问
  • 电商网站开发怎么样客户关系管理理论
  • asp网站数据库连接制作手游需要学什么软件
  • 网站建设开标书哪个网站做自媒体比较好
  • 关于网站建设项目的投诉函秦皇岛网站搜索排名