1、渐变字体

  主要是看:-webkit-background-clip: text; 该属性

<style>
.b1{
width: 500px;
height: 200px;
font-size: 100px;
background-image: linear-gradient(to bottom, rgb(, , ), rgb(, , ));
-webkit-background-clip: text;
color: transparent;
/* -webkit-text-fill-color: transparent; */
}
</style>
</head>
<body>
<div class="b1">
<div class="b2">测试知否</div>
</div>
</body>

2、镂空字体

  主要是:-webkit-text-stroke: 3px yellow; 该属性。

.b1{
width: 500px;
height: 150px;
font-size: 100px;
background-image: linear-gradient(to bottom, rgb(, , ), rgb(, , ));
/* -webkit-background-clip: text; */
color: transparent;
-webkit-text-stroke: 3px yellow;
}

3、input框提示信息颜色

<style>
/* .b1{
-webkit-text-stroke: 1px yellow;
} */
input::-webkit-input-placeholder { color: red; }/* WebKit browsers */
input:-moz-placeholder { color: red; }/* Mozilla Firefox 4 to 18 */
input::-moz-placeholder { color: red; }/* Mozilla Firefox 19+ */
input:-ms-input-placeholder { color: red; }/* Internet Explorer 10+ */
</style>
</head>
<body>
<input class="b1" type="text" placeholder="测试知否">
</body>

4、给图片加上内阴影

  通过 box-shadow 属性可以给DIV增加外阴影,而 inset 这个属性则可以变为内阴影

  这里有个小技巧通过给图片设置相对定位并给上叠层顺序为 -1 就可以实现图片内阴影

<style>
.b1{
box-shadow:inset 30px #FF1493;
display:inline-block;
}
img{
position: relative;
display: block;
z-index: -;
}
</style>
</head>
<body>
<div class="b1">
<img src="./ly.png" width="100px">
</div>
</body>

5、3/4圆

  其实3/4圆弧可以用一句css就能解决,border-left:2px solid transparent; 绘出圆后,将一侧边框设置为透明即可搞定

#cir{
width: 100px;
height: 100px;
border: 2px solid red;
border-radius: %;
border-left: 2px solid transparent;
transform: rotate(45deg);
}

CSS渐变字体、镂空字体、input框提示信息颜色、给图片加上内阴影、3/4圆的更多相关文章

  1. input 框提示信息

    给input添加提示信息,只需添加 “placeholder”的class,将提示信息放在value中, 其中“placeholder”的名字是随便取的,不是H5的“placeholder”属性 例子 ...

  2. from表单、css选择器、css组合器、字体样式、背景属性、边框设置、display设置

    目录 一.form表单 1.form表单功能 2.表单使用原理 二.前端基础之css 1.关于css的介绍 2.css语法 3.三种编写CSS的方式 3.1.style内部直接编写css代码 3.2. ...

  3. 四、Input框改placeholder中字体的颜色

    Input框改placeholder中字体的颜色 input::-webkit-input-placeholder { color: #ccc; font-size: 12px; }

  4. 解决input框中加入disabled="disabled"之后,改变字体的颜色(默认的是灰色)

    在input框中加入disabled="disabled"之后,字体默认的就变成灰色了 解决方案 input[disabled]{color:#fff;opacity:1} dis ...

  5. css 修改placeholder字体颜色字体大小 修改input记住账号密码后的默认背景色

     壹 ❀ 引 本来这个阶段的项目页面都是给实习生妹子做的,我只用写写功能接接数据,但这两天妹子要忙翻译,这个工作阶段也快结束了导致有点慌,只能自己把剩余的几个小页面给写了. 那么做页面的过程中,UI也 ...

  6. 我给女朋友讲编程CSS系列(3) CSS如何设置字体的类型、大小、颜色,如何使用火狐浏览器的Firebug插件查看网页的字体

    一.CSS如何设置字体的类型.大小.颜色 设计网页时,一般设置body的字体,让其他标签继承body的字体,这样设置特别方便,但是标题标签h1到h6和表单标签(input类型)是没有继承body的字体 ...

  7. DIV+CSS+JS实现色彩渐变字体

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  8. 【CSS】input 框的一些事情

    1.input框光标太长与不居中的问题 如果input框height:40px 为了字体垂直居中line-height也设为40px 问题来了,这样光标在刚刚focus时候是占据整个input框并且输 ...

  9. CSS基本知识6-CSS字体

    首先要考虑的是文本的排版,实际上有这玩意,Word还需要吗?不需要了.我们列下文本所涉及的操作: CSS 文本属性 属性 描述 color 设置文本颜色 direction 设置文本方向. line- ...

随机推荐

  1. SPOJ11414 COT3 博弈论 + Trie树合并

    考虑对于每个子树从下往上依次考虑 对于叶子节点而言,如果可以染色,那么其\(sg\)值为\(1\),否则为\(0\) 考虑往上合并 如果选择了\(x\),那么后继状态就是其所有子树 如果选了其他子树中 ...

  2. hdu 5194 组合数学or暴力

    直接凑了个公式带入,没想到直接ac了,至于题解中的期望可加性可以参考概率论相关知识 #include<cstdio> #include<iostream> #include&l ...

  3. Xtreme9.0 - Pattern 3 KMP

    Pattern 3 题目连接: https://www.hackerrank.com/contests/ieeextreme-challenges/challenges/car-spark Descr ...

  4. CentOS下KVM配置NAT网络(网络地址转换模式)

    KVM虚拟机Nat方式上网: # 查看当前活跃的网络 virsh net-list # 查看该网络的详细配置 virsh net-dumpxml default 客户机的XML配置文件中interfa ...

  5. 阿里云VPC默认网关问题

    在使用VPC专用网络时,阿里云上面不用设置网关都可以工作,其实不是的,狗日的阿里云居然把默认网关设置成了253,比如设置了172.18.0.0/24时,那么它的默认网关就是172.18.0.253.

  6. qunar-dns

    去哪儿QInfra大会 IT大咖说 - 大咖干货,不再错过   http://www.itdks.com/eventlist/detail/1313

  7. MongoDB简单使用 —— 驱动

    C#中可以通过官方的驱动MongoDB.Drvier来使用,使用Nuget安装即可. Install-Package MongoDB.Driver Bson文档操作: using MongoDB.Bs ...

  8. git 拉取和获取 pull 和 fetch 区别

    使用Git  直接提交的话   直接 push 获取最新版本  有两种  拉取 和 获取 pull 和 fetch git  pull     从远程拉取最新版本 到本地  自动合并 merge   ...

  9. CentOS 6.8 安装 Python3

    由于没有GCC无法编译安装Python3.6, 所以先安装GCC(yum install gcc) 下载地址:https://www.python.org/ftp/python/ 1 tar zxvf ...

  10. socket listen参数中的backlog

    服务器监听时,在每次处理一个客户端的连接时是需要一定时间的,这个时间非常的短(也许只有1ms 或者还不到),但这个时间还是存在的.而这个backlog 存在的意义就是:在这段时间里面除了第一个连接请求 ...