/* Track */
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
-webkit-border-radius: 5px;
border-radius: 5px;
}

/* Handle */
::-webkit-scrollbar-thumb {
-webkit-border-radius:5px;
border-radius: 6px;
background: rgba(158, 79, 104, 0.8);
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
::-webkit-scrollbar-thumb:window-inactive {
background: rgba(158, 79, 104, 0.8);
}

/*取消A默认点击背景色*/
a,a:hover,a:active,a:visited,a:link,a:focus{
-webkit-tap-highlight-color:rgba(0,0,0,0);
-webkit-tap-highlight-color: transparent;
outline:none;
background: none;
text-decoration: none;
}

//css限制显示行数
display: -webkit-box;
display: -moz-box;
/*white-space: pre-wrap; */
word-wrap: break-word;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp:8;
文字竖布局
writing-mode: tb-rl;
-webkit-writing-mode:vertical-rl;
writing-mode: vertical-rl;

移动端1px解决方案

.user-header .user-tags .tags-list{
position: relative;
border-radius: 40rpx;
height: 60rpx;
line-height: 60rpx;
box-sizing: border-box;
padding: 0 40rpx;
background: #fdcf47;
color: #49381d;
font-size: 26rpx;
margin:0 10rpx;
}
.user-header .user-tags .tags-list::before{
display: block;
content: "";
pointer-events: none; /* 防止点击触发 */
box-sizing: border-box;
position: absolute;
width: 200%;
height: 200%;
left:;
top:;
border-radius: 54rpx;
border:1px solid #49381d;
-webkit-transform:scale(0.5);
-webkit-transform-origin: 0 0;
transform:scale(0.5);
transform-origin: 0 0;
}

按钮hover样式

hover后

<div class="btn"></div>

/*css 样式*/
.btn{
width: 150px;
height: 50px;
background: red linear-gradient(to right,rgba(0,255,0,0),rgba(0,255,0,0.7));
transition: background-color 0.5s;
}
.btn:hover{
background-color: rebeccapurple;
}

文字叠加效果

<div class="mix">
<span data-text="css纹理叠加"></span>
css纹理叠加
</div> /*css 样式*/ .mix{
font-size: 80px;
font-family: '微软雅黑';
background-image: url("58db48fa0edb9.jpg");
-webkit-text-fill-color: transparent;
        -webkit-background-clip: text;
}
.mix>span{
position: absolute;
background-image: linear-gradient(to right,#f00,#f00);
mix-blend-mode: overlay;
-webkit-text-fill-color: transparent;         -webkit-background-clip: text;
} .mix>span::before{ content:attr(data-text); }

文字渐变

<div class="font-color">文字渐变</div>

/*css 样式*/

        .font-color{
display: inline-block;
color: #f00;
font-size: 10em;
background-image: -webkit-gradient(linear,0 0,100% 100%,from(green),to(yellow));
-webkit-text-fill-color: transparent;
        -webkit-background-clip: text;
}

流光字体

<div class="font-animate">
<h2>这是一个可以变色的文字</h2>
</div> /*css 样式*/ .font-animate{
font-size: 5em;
background-image: -webkit-linear-gradient(left,#f00,#54e 25%, #f00 50%,#54e 75%,#f00);
-webkit-text-fill-color: transparent;
background-size: 200% 100%;
animation: fontAnimate 4s infinite linear;
        -webkit-background-clip: text;
} @keyframes fontAnimate{ 0%{ background-position: 0 0; } 100%{ background-position: -100% 0; } }

按轨迹运动(path)

<div>
<div class="circle"></div>
<svg width="580" height="400" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="#000" id="canvas_background" height="402" width="582" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%"/>
</g>
</g>
<g>
<title>Layer 1</title>
<path id="svg_1" d="m285.38772,136.28634c66.58567,-164.79148 327.47049,0 0,211.87475c-327.47049,-211.87475 -66.58567,-376.66623 0,-211.87475z" stroke-width="1.5" stroke="#000" fill="#fff"/>
</g>
</svg>
</div> /*css 样式*/ .circle{
position: absolute;
width: 10px;
height: 10px;
background:red;
border-radius: 50%;
motion-path:path("m285.38772,136.28634c66.58567,-164.79148 327.47049,0 0,211.87475c-327.47049,-211.87475 -66.58567,-376.66623 0,-211.87475z");
offset-path:path("m285.38772,136.28634c66.58567,-164.79148 327.47049,0 0,211.87475c-327.47049,-211.87475 -66.58567,-376.66623 0,-211.87475z");
animation: move 6s linear infinite;
}
@keyframes move{
100%{
motion-offset:100%;
}
100%{
offset-distance:100%;
}
}

css 样式 记录的更多相关文章

  1. 常用的 css 样式 记录

    1.font-style 属性指定文本的字体样式. 对应的值有: normal 默认值.浏览器显示一个标准的字体样式;  italic 浏览器会显示一个斜体的字体样式;  oblique  浏览器会显 ...

  2. css样式记录

    样式一 #sideBar,#blog_post_info_block { display: none; } #under_post_news { display: none; } /*评论框大小*/ ...

  3. (转载)记录函数 getStyle() 获取元素 CSS 样式

    设置元素(element)的css属性值可以用element的style属性,例如要将element的背景色设置为黑色,可以这么做: element.style.backgroundColor = ' ...

  4. jquery操作CSS样式全记录

    $(this).click(function(){  if($(this).hasClass(“zxx_fri_on”)){    $(this).removeClass(“zxx_fri_on”); ...

  5. 对于一些css样式的巧妙方法进行总结。

    针对之前遇到过的一些特殊样式的实现,我今天做个总结,目的有二:一是将这些方法记录下来,以便将来需要用到时查找使用.二为将这些大神们智慧的结晶发扬光大,让广大前端程序猿们能够少走弯路.此贴为更新帖,以后 ...

  6. HTML标记语言和CSS样式的简单运用(Nineteenth Day)

    曾经励志下去要坚持把每天所学的知识记录下来,可是坚持了几天后,就觉得自己坚持不下去了....这几天自己好好的想了想,觉得不能坚持也得要坚持,因为要对自己负责,所以得学会逼着自己去做,只有这样才能把一件 ...

  7. PHP使用echo输出标签设置CSS样式问题

    使用php是可以输出HTML标签的,这为页面设计带来很大方便. 在此记录php输出标签设置CSS样式的问题: echo可使用''.""或你不用引号,如果想要输出带CSS样式的HTM ...

  8. 常用css样式(布局)

    兼容css3新属性 在css3中,我们可以使用prefixfree.min.js这个插件来自动为css3的相关属性加上兼容浏览器属性,使我们不用为每个css3新属性再加上属性(需要用到大量css3的项 ...

  9. IIS发布,无法显示CSS样式和图片

    描述: 最近给同事安装web程序时,把IIS安装好后,发布网站时,图片和css样式不显示. 程序没问题,发布也没问题. 后来网上一查,出错的原因可能是IIS的配置问题. 果然,按照网上的方法,顺利显示 ...

随机推荐

  1. 二十一、Linux 进程与信号---进程查看和进程状态、进程调度和进程状态变化、进程标识

    21.1 进程查看和进程状态 21.1.1 ps 指令 ps 指令通常可以查看到进程的 ID.进程的用户 ID.进程状态和进程的 Command ps:查看当前用户启动的进程 ps -ef:详细查看后 ...

  2. luogu 2014 选课 树上背包

    树上背包 #include<bits/stdc++.h> using namespace std; ; const int inf=0x3f3f3f3f; vector<int> ...

  3. 2016-2017-2 20155324实验二《Java面向对象程序设计》实验报告

    2016-2017-2 20155324实验二<Java面向对象程序设计>实验报告 实验内容 初步掌握单元测试和TDD 理解并掌握面向对象三要素:封装.继承.多态 初步掌握UML建模 熟悉 ...

  4. C++ 变量的引用 &

    创建变量的引用:int &a = b; 引用变量a是变量b的别名:是传址操作,把变量b的数据地址赋值给变量a,a和b指向同一个数据 主要用途:用作函数的形参,通过将引用变量用作参数,函数将使用 ...

  5. Java EE之Hibernate异常总结org.hibernate.MappingException: Repeated column in mapping for entity:

    解决方案/原因: 一个pojo(JavaBean)中不能有两个属性同时映射到一个数据库字段上 即使是一个属性的两个getter方法也不行 %%%% Error Creating SessionFact ...

  6. 阿里云三台CentOS7.2配置安装CDH5.12

    1 购买3台阿里云服务 2 配置好ssh连接客户端 根据自己情况连接 3 安装好MySQL5.7 跳过,见之前博客 安装在hadoop001上 4 设置好Hosts文件 3台机器同时操作 vim /e ...

  7. python购物车作业

    # -*- coding:utf8 -*- # Author:Wang Yao goods = [{"name": "电脑", "price" ...

  8. Django REST Framework API Guide 03

    本节大纲 1.Routers 2.Parsers 3.Renderers Routers Usage from rest_framework import routers router = route ...

  9. openstack Q版部署-----环境搭建(1)

    浏览器建议全程使用火狐或者谷歌,不然VNC可能会有问题 一.环境准备 系统:centos7.2 x86_64 controller 2c+8g+40g 10.1.80.110 可以nat上网 comp ...

  10. 将replicated数据与元数据关联

    本章介绍元数据的用法以及如何将replicated数据与元数据相关联. 12.1概述 将数据从一个表复制到另一个表时,重要的考虑因素是源表和目标表的列结构(元数据)是否相同. Oracle Golde ...