/* 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. select实现简单TCP通信(ubuntu 18.04)

    一.服务器程序(server.c) #include <stdio.h> #include <unistd.h> #include <stdlib.h> #incl ...

  2. 导弹拦截 dp

    n∗lognn*lognn∗logn写法,lis[i]的意义为:所有最长上升子序列长度为i的位置上的最小a数组元素值lis[i]的意义为:所有最长上升子序列长度为i的位置上的最小a数组元素值lis[i ...

  3. Chain训练准则的计算

    轮迭代时验证集的日志: log/compute_prob_valid.1000.log: LOG (nnet3-chain-compute-prob[5.5.100-d66be]:PrintTotal ...

  4. LOJ #2058「TJOI / HEOI2016」求和

    不错的推柿子题 LOJ #2058 题意:求$\sum\limits_{i=0}^n\sum\limits_{j=0}^nS(i,j)·2^j·j!$其中$ S(n,m)$是第二类斯特林数 $ Sol ...

  5. centOS7 tomcat 开机自启 自启动设置

    1.编写配置文件 // (1)修改tomcat.service vim /lib/systemd/system/tomcat.service // (2)复制以下代码,注意修改tomcat路径 [Un ...

  6. 安装mysql8.0.12以及修改密码和Navicat的连接

    mysql8.0+与安装其他版本不同一.安装mysql8.0.121.到官网https://www.mysql.com/  下载mysql-8.0.12-winx64.zip(不要.mis),直接解压 ...

  7. Informatic 使用过程中的问题

    1.database driver error ORA-12154 1)检查监听是否启动 2)是否在tnsnames.ora中配置

  8. nodejs -Promise

    创建一个 readFile.js,读取三个文件abc的内容并输出到控制台 var fs = require('fs') fs.readFile('./a.txt','utf-8',function ( ...

  9. OGG选择捕捉和应用模式

    本章包含的信息可帮助您确定适用于数据库环境的捕获和应用模式. 主题: Oracle GoldenGate捕获和应用进程概述 决定使用哪种捕捉方法 决定使用哪种应用方法 同时使用不同的捕捉和应用模式 切 ...

  10. bootstrap中的明星属性

    1.明星属性 bootstrap中的明星属性 class='text-nowrap' 2.明星代码 $(window).resize(function () { location.reload(); ...