前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >CSS的几个demo

CSS的几个demo

作者头像
老猫-Leo
发布2023-12-11 20:14:14
1610
发布2023-12-11 20:14:14
举报
文章被收录于专栏:前端大全前端大全

CSS的几个demo……

图片加速旋转特效

代码语言:javascript
复制
img:hover{
  transform: rotate(666turn);
  transition-delay: 1s;
  transition-property: all;
  transition-duration: 59s;
  transition-timing-function: cubic-bezier(.34,0,.84,1);
  -moz-transition-timing-function: cubic-bezier(.34,0,.84,1);       /* Firefox 4 */
  -webkit-transition-timing-function: cubic-bezier(.34,0,.84,1);    /* Safari 和 Chrome */
  -o-transition-timing-function: cubic-bezier(.34,0,.84,1);         /* Opera */
}

浮云特效

html example

代码语言:javascript
复制
<div id="mid-ground" class="wall"></div>
<div id="for-eground" class="wall"></div>

css

代码语言:javascript
复制
@-webkit-keyframes STAR-MOVE {
  from {
    background-position:0% 0%;
  }
  to {
    background-position:600% 0%;
  }
}@keyframes STAR-MOVE {
  from {
    background-position:0% 0%;
  }
  to {
    background-position:600% 0%;
  }
}
.wall {
  position:absolute;
  top:0;
  left:0;
  bottom:0;
  right:0;
}
div#mid-ground {
  background:url('midground.png') repeat 20% 0%;      //图片地址:http://a.biugle.cn/img/midground.png
  z-index:0;
  -webkit-animation:STAR-MOVE  90s linear infinite;
  -moz-animation:STAR-MOVE  90s linear infinite;
  -ms-animation:STAR-MOVE  90s linear infinite;
  animation:STAR-MOVE  90s linear infinite;
  animation-direction:alternate;
}
div#fore-ground {
  background:url('foreground.png') repeat 35% 0%;     //图片地址:http://a.biugle.cn/img/foreground.png
  z-index:0;
  -webkit-animation:STAR-MOVE  55s linear infinite;
  -moz-animation:STAR-MOVE  55s linear infinite;
  -ms-animation:STAR-MOVE  55s linear infinite;
  animation:STAR-MOVE  55s linear infinite;
  animation-direction:alternate;
}

滚动条样式

代码语言:javascript
复制
/* CHROME浏览器中自定义滚动条样式 */
/* 滚动条的宽度 */
::-webkit-scrollbar {
  width:1.5vh;
  height:1.5vh;
  background-color:rgba(255,255,255,0.1);
}
/* ::-webkit-scrollbar-track-piece滚动条凹槽的颜色,还可以设置边框属性。 */
::-webkit-scrollbar-track {
  -webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);
  background-color:#888;
}
::-webkit-scrollbar-thumb:hover{
  background-color: chocolate;
}
/* 滚动条的设置 */
::-webkit-scrollbar-thumb { 
  -webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);
  background-color:#2f2f2f;
}

参考文章

底部版权信息模板

html example

代码语言:javascript
复制
<div class="footer-bottom">
  <p>&emsp;湘ICP备19012697号&emsp;Copyright&copy;2018&emsp;<a href="https://biugle.cn">DoubleAm</a>&emsp;www.biugle.cn&emsp;</p>
</div>

css

代码语言:javascript
复制
.footer-bottom {
  z-index:10;
  height:5vh;
  line-height:1vh;
  position:fixed;
  bottom:0;
  width:100%;
  text-align:center;
  background-color:rgba(255,255,255,0.2);
  color:#fff;
  font-size:1vh;
  letter-spacing:0.1vh;
  cursor: default;
}
.footer-bottom a {
  color:#fff !important;
  text-decoration: none !important;
  cursor: pointer;
}
.footer-bottom a:hover{
  color: chocolate !important;
}

设置鼠标样式

代码语言:javascript
复制
cursor: url(image-url),type;
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019-03-15,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 图片加速旋转特效
  • 浮云特效
    • html example
      • css
      • 滚动条样式
      • 底部版权信息模板
        • html example
          • css
          • 设置鼠标样式
          领券
          问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档