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

如何自己做一个app优化关键词排名哪家好

如何自己做一个app,优化关键词排名哪家好,36kr wordpress,建站用什么工具注:本文内容分享转载自 HarmonyOS Developer 官网文档 点击查看《开发指导—利用CSS动画实现HarmonyOS动效(一)》 3. background-position 样式动画 通过改变 background-position 属性(第一个值为 X 轴的位置,第二个…

注:本文内容分享转载自 HarmonyOS Developer 官网文档

点击查看《开发指导—利用CSS动画实现HarmonyOS动效(一)》

3. background-position 样式动画

通过改变 background-position 属性(第一个值为 X 轴的位置,第二个值为 Y 轴的位置)移动背景图片位置,若背景图位置超出组件则超出部分的背景图不显示。

<!-- xxx.hml --><div class="container">  <div class="content"></div>  <div class="content1"></div></div>
/* xxx.css */.container {  height: 100%;  background-color:#F1F3F5;  display: flex;  flex-direction: column;  justify-content: center;  align-items: center;  width: 100%;}.content{  width: 400px;  height: 400px;  /* 不建议图片长宽比为1:1 */  background-image: url('common/images/bg-tv.jpg');  background-size: 100%;  background-repeat: no-repeat;  animation: change 3s infinite;  border: 1px solid black;}.content1{  margin-top:50px;  width: 400px;  height: 400px;  background-image: url('common/images/bg-tv.jpg');  background-size: 50%;  background-repeat: no-repeat;  animation: change1 5s infinite;  border: 1px solid black;}/* 背景图片移动出组件 */@keyframes change{  0%{    background-position:0px top;  }  25%{    background-position:400px top;  }  50%{    background-position:0px top;  }  75%{    background-position:0px bottom;  }  100%{    background-position:0px top;  }}/* 背景图片在组件内移动 */@keyframes change1{  0%{    background-position:left top;  }  25%{    background-position:50% 50%;  }  50%{    background-position:right bottom;  }  100%{    background-position:left top;;  }}

说明

background-position 仅支持背景图片的移动,不支持背景颜色(background-color)。

4.  svg 动画

为 svg 组件添加动画效果。

属性样式动画

在 Svg 的子组件animate中,通过 attributeName 设置需要进行动效的属性,from 设置开始值,to 设置结束值。

<!-- xxx.hml --><div class="container">  <svg>    <text x="300" y="300" fill="blue">      Hello      <animate attributeName="font-size" from="30" to="60" dur="3s" repeatCount="indefinite">      </animate>      <animate attributeName="fill" from="red" to="blue" dur="3s" repeatCount="indefinite">      </animate>      <animate attributeName="opacity" from="1" to="0.3" dur="3s" repeatCount="indefinite">      </animate>    </text>    <text x="300" y="600" fill="blue">      World      <animate attributeName="font-size" from="30" to="60" values="30;80" dur="3s" repeatCount="indefinite">      </animate>      <animate attributeName="fill" from="red" to="blue"  dur="3s" repeatCount="indefinite">      </animate>      <animate attributeName="opacity" from="0.3" to="1" dur="3s" repeatCount="indefinite">      </animate>    </text>  </svg></div>

说明

在设置动画变化值时,如果已经设置了 values 属性,则 from 和 to 都失效。

路径动画

在 Svg 的子组件animateMotion中,通过 path 设置动画变化的路径。

<!-- xxx.hml --><div class="container">  <svg fill="white" width="800" height="900">    <path d="M300,200 h-150 a150 150 0 1 0 150 -150 z" fill="white" stroke="blue" stroke-width="5" >    </path>    <path fill="red" d="M-5,-5 L10,0 L-5,5 L0,0 Z"  >      <animateMotion dur="2000" repeatCount="indefinite" rotate="auto-reverse"path="M300,200 h-150 a150 150 0 1 0 150 -150 z">      </animateMotion>    </path>  </svg></div>

animateTransform 动画

在 Svg 的子组件animateTransform中,通过 attributeName 绑定 transform 属性,type 设置动画类型,from 设置开始值,to 设置结束值。

<!-- xxx.hml --><div class="container" style="">    <svg>        <line x1="90" y1="300" x2="90" y2="730" stroke-width="10" stroke="black" stroke-linecap="round">            <animateTransform attributeName="transform" attributeType="XML" type="translate"  dur="3s" values="0;30;10;30;20;30;25;30" keyTimes="0;0.3;0.5;0.7;0.8;0.9;1.0;1.1"                              fill="freeze">            </animateTransform>        </line>        <circle cx="500" cy="500" r="50" stroke-width="15" fill="red" stroke="#e70d0d">            <animateTransform attributeName="transform" attributeType="XML" type="rotate"  dur="3s" values="0;30;10;30;20;30;25;30" keyTimes="0;0.3;0.5;0.7;0.8;0.9;1.0;1.1" fill="freeze">            </animateTransform>            <animateTransform attributeName="transform" attributeType="XML" type="scale"  dur="6s" values="1;1;1.3" keyTimes="0;0.5;1" fill="freeze"></animateTransform>            <animateTransform attributeName="transform" attributeType="XML" type="translate"  dur="9s" values="0;0;300 7" keyTimes="0;0.6;0.9" fill="freeze"></animateTransform>        </circle>        <line x1="650" y1="300" x2="650" y2="600" stroke-width="20" stroke="blue" stroke-linecap="round">            <animateTransform attributeName="transform" attributeType="XML" type="translate"  dur="9s" values="0;0;0 800" keyTimes="0;0.6;1" fill="freeze"></animateTransform>        </line>    </svg></div>
/* xxx.css */.container {  flex-direction: column;  align-items: center;  width: 100%;  height: 100%;  background-color: #F1F3F5;}

http://www.15wanjia.com/news/28807.html

相关文章:

  • 用html5做的网站如何检测网站是否安全
  • excel做公司的小网站免费人脉推广
  • 做的网站每年都要交费吗2021年经典营销案例
  • 深圳网站建设设计sem代运营
  • 换空间网站备案吗杭州seo论坛
  • ui网页设计实训报告关键词优化seo优化排名
  • 品牌设计工作内容百色seo关键词优化公司
  • wordpress获取tag第一篇文章seo高手是怎样炼成的
  • 天元建设集团有限公司烟台分公司排名轻松seo 网站
  • 网站运营托管方案发帖推广平台
  • 网站源码大全免费腾讯广告平台
  • 为何网站打不开软文营销文章300字
  • 如何做旅游攻略网站企业seo
  • 网站引擎友好性分析百度联盟点击广告赚钱
  • 备案 网站名称怎么写中文搜索引擎
  • 网站的维护怎么做百度怎么投放广告
  • 天津网站大全百度上海分公司地址
  • 网站建设入门教程视频教程免费友情链接网页
  • 手机网站建设教程常用的营销策略
  • 网站会员注册怎么做站优化
  • 做网站公司yuanmus教育培训机构有哪些
  • 农业信息网站 建设网络营销实训总结报告
  • 风铃做的网站能否推广网站营销与推广
  • 郑州网站优化软件互联网电商平台有哪些
  • 做网站教程 第一课看seo
  • 淄博哪里有网站建设平台营销型网站制作建设
  • 怎么做像滴滴一样网站发布软文
  • 公司网站制作费用申请信息流广告投放流程
  • wordpress同类软件网络营销就是seo正确吗
  • 代理上网广州专业seo公司