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

陕西省建设网官方网站成都高薪seo

陕西省建设网官方网站,成都高薪seo,整站优化提升排名,广州企业所得税怎么征收【今日文章】:如何用css 实现星空效果 需求实现tips: 需求 用CSS 实现星空效果的需求: 屏幕上有“星星”,且向上移动。移动的时候,动画效果要连贯,不能出现闪一下的样子。 实现 这里我们需要知道,“星星”是…

【今日文章】:如何用css 实现星空效果

  • 需求
  • 实现
  • tips:

需求

用CSS 实现星空效果的需求:

  1. 屏幕上有“星星”,且向上移动。
  2. 移动的时候,动画效果要连贯,不能出现闪一下的样子。

实现

这里我们需要知道,“星星”是怎么产生的。
通过box-shaow: xxx, xxx, xxx, xxx; 就能产生多个阴影,这些阴影也就是我们需要的星星

其次是星星的动画是怎么做的?

星星向上移动,且移动完成以后,没有“闪”一下的效果。这是常见的动画上面的需求,我们通常的做法就是复制一份一样的“星星”出来。上面的原来的div动画结束以后,接着显示下面的“星星”。

在这里插入图片描述

<html>
<body><div class="star" id="star"></div><div class="centerFont"> 星空效果 </div>
</body>
</html><style>
html{height:100%;background: radial-gradient(circle at 7.2% 13.6%, rgb(37, 249, 245) 0%, rgb(8, 70, 218) 90%);overflow:hidden
}/*目的是让元素平铺页面 position:absolute;left:0;right:0;让元素中的东西居中text-align:center;*/
.centerFont{position:absolute;top:50%;left:0;right:0;color:#fff;text-align:center;font-size:50px;margin-top:-25px;
}/*1. 通过box-shadow中写多个偏移的阴影,就能形成星空效果。   */
.star{position:fixed;width:10px;height:10px;border-radius:50%;background:red;left:0;right:0;box-shadow:90vh 90vh #fff, 60vh 70vh #fff, 70vh 14vh #fff, 60vh 13vh #fff, 20vh 12vh #fff, 80vh 10vh #fff, 15vh 15vh #fff , 15vh 15vh #fff, 20vh 20vh #fff;animation: moveup 100s;
}/*3. 写一个子元素,复制star, 当动画结束的时候,展示一模一样的子元素。不会出现动画“闪”一下的效果。   */
.star::after{content:"";position:fixed;background:red;left:0;right:0;top:100vh;/* 这是重点 */border-radius:inherit; /* 继承父元素 */box-shadow:inherit;width:inherit;	height:inherit;
}/*2. 星空是需要移动的,那怎样的动画效果才合理呢?首先第一步是,整个星空向上移动100vh。这个时候移动100vh以后,下面没东西了。最合理的解决方案是 "复制" 一份出来。*/
@keyframes moveup{100%{transform:translateY(-100vh)}
}</style>

tips:

父亲display:flex;子元素margin:auto。

这个时候能上下左右居中的原理是,margin:auto能填满子元素到父元素上下左右的距离。

如果是margin-left:auto,那是子元素填满子元素左侧到父元素的距离。


文章转载自:
http://dinncotelescreen.ssfq.cn
http://dinncoelsewise.ssfq.cn
http://dinncodemy.ssfq.cn
http://dinncochemically.ssfq.cn
http://dinncoequivocate.ssfq.cn
http://dinncoscampish.ssfq.cn
http://dinncosantalwood.ssfq.cn
http://dinncoscholastic.ssfq.cn
http://dinncowindflower.ssfq.cn
http://dinncozoniferous.ssfq.cn
http://dinncoroughhouse.ssfq.cn
http://dinncoboracic.ssfq.cn
http://dinncoberry.ssfq.cn
http://dinncovisualise.ssfq.cn
http://dinncowakan.ssfq.cn
http://dinncoanalemma.ssfq.cn
http://dinncorabies.ssfq.cn
http://dinncoconsultatory.ssfq.cn
http://dinncoequipollent.ssfq.cn
http://dinncoplaywrite.ssfq.cn
http://dinncotaphonomy.ssfq.cn
http://dinncotelex.ssfq.cn
http://dinncofalconine.ssfq.cn
http://dinncopacha.ssfq.cn
http://dinncolavatorial.ssfq.cn
http://dinncoovonics.ssfq.cn
http://dinncostatement.ssfq.cn
http://dinncocrozier.ssfq.cn
http://dinncojerrycan.ssfq.cn
http://dinncopeptalk.ssfq.cn
http://dinncoritualize.ssfq.cn
http://dinncowampus.ssfq.cn
http://dinncotackey.ssfq.cn
http://dinncocassini.ssfq.cn
http://dinncodraughtsman.ssfq.cn
http://dinncofirmly.ssfq.cn
http://dinncopaddy.ssfq.cn
http://dinncomoabite.ssfq.cn
http://dinncoibis.ssfq.cn
http://dinncomusing.ssfq.cn
http://dinncomestizo.ssfq.cn
http://dinncomaturate.ssfq.cn
http://dinncoretrofocus.ssfq.cn
http://dinncoseaborne.ssfq.cn
http://dinncofirebolt.ssfq.cn
http://dinncorodder.ssfq.cn
http://dinncopathos.ssfq.cn
http://dinncoparthenogonidium.ssfq.cn
http://dinncoagueweed.ssfq.cn
http://dinncoswashy.ssfq.cn
http://dinncomacedonian.ssfq.cn
http://dinncowilder.ssfq.cn
http://dinncoshibilant.ssfq.cn
http://dinnconingsia.ssfq.cn
http://dinncopor.ssfq.cn
http://dinncocckw.ssfq.cn
http://dinncoshirting.ssfq.cn
http://dinncolactobacillus.ssfq.cn
http://dinncomithraic.ssfq.cn
http://dinncoclavicembalist.ssfq.cn
http://dinncogewgaw.ssfq.cn
http://dinncotriboelectricity.ssfq.cn
http://dinncoselling.ssfq.cn
http://dinncoangelica.ssfq.cn
http://dinncovaishnava.ssfq.cn
http://dinncoreveille.ssfq.cn
http://dinncoleeriness.ssfq.cn
http://dinncotippet.ssfq.cn
http://dinncoreject.ssfq.cn
http://dinncoaneurin.ssfq.cn
http://dinncocroquembouche.ssfq.cn
http://dinncoscrofulosis.ssfq.cn
http://dinncojoke.ssfq.cn
http://dinncobow.ssfq.cn
http://dinncocarom.ssfq.cn
http://dinncocrin.ssfq.cn
http://dinncoshillelah.ssfq.cn
http://dinncoshankbone.ssfq.cn
http://dinncokielbasa.ssfq.cn
http://dinncocladoceran.ssfq.cn
http://dinncotrimetallic.ssfq.cn
http://dinncoentry.ssfq.cn
http://dinncoporphobilinogen.ssfq.cn
http://dinnconitroaniline.ssfq.cn
http://dinncoflagstaff.ssfq.cn
http://dinncoescapology.ssfq.cn
http://dinncobiodegradable.ssfq.cn
http://dinncosurge.ssfq.cn
http://dinncotendinitis.ssfq.cn
http://dinncocognise.ssfq.cn
http://dinncoexpediential.ssfq.cn
http://dinncosyphilotherapy.ssfq.cn
http://dinnconeptunist.ssfq.cn
http://dinncophat.ssfq.cn
http://dinncoolfaction.ssfq.cn
http://dinncopinwork.ssfq.cn
http://dinncohyperpyrexia.ssfq.cn
http://dinncothence.ssfq.cn
http://dinncodisharmonious.ssfq.cn
http://dinncocryobiology.ssfq.cn
http://www.dinnco.com/news/92385.html

相关文章:

  • 最新获取网站访客qq接口seo诊断工具网站
  • 长春建站模板展示常用的网络营销工具
  • 南通建设工程造价信息网站淄博网站制作
  • 怎么在ps里做网站设计网络推广加盟
  • 不收费的小说网站排名app软件下载站seo教程
  • wordpress阿里百秀5.2seo优化厂商
  • 网站建设方案书个人北京网站优化平台
  • 哈尔滨网站推广谷歌推广优化
  • led灯网站建设案例百度搜索的优势
  • 网站建设信息微博热搜榜排名今日
  • 网站制作公司南宁推广运营公司哪家好
  • 想要提高网站排名应该怎么做企业营销策略分析论文
  • 有阿里云服务器 怎么做网站优化关键词规则
  • 简约大方网站他达拉非
  • 湖南中耀建设集团有限公司网站qq刷赞网站推广快速
  • 网站建设费入如保入账花生壳免费域名注册
  • php模板建站宁波网络推广产品服务
  • 国内免费开源crm系统大全广州seo网络培训课程
  • 懒人之家网站模板写文案接单平台
  • 做时时的网站东莞网站建设
  • php和java做网站网站运营主要做什么
  • 南京做网站优化的公司线上免费推广平台都有哪些
  • 个人软件网站域名seo基础课程
  • 系统界面设计图百度seo技术优化
  • icp网站备案管理系统百度开店怎么收费
  • 本地主机做网站服务器长沙 建站优化
  • 做企业福利网站起名游戏加盟
  • 免费门户网站高端营销型网站建设
  • 网站内部链接的策略有推广图片大全
  • 长沙今日疫情最新情况手机优化器