5.css三角的做法
如上图所示,类似这样的小三角都可以通过以下代码写出:
.box1 {
width: ;
height: ;
/* border: 10px solid pink; */
border-top: 10px solid pink;
border-right: 10px solid red;
border-bottom: 10px solid blue;
border-left: 10px solid green;
}这样的代码出现的样式如下图
- 若把4条边中的三条边换成透明色,则会出现三角的样式,代码如下:
.box2 {
width: ;
height: ;
border: 50px solid transparent;
border-left-color: pink;
margin: 100px auto;
}
- 京东的样式制作,如下代码:
.jd {
position: relative;
width: 200px;
height: 200px;
background-color: pink;
} .jd span {
position: absolute;
top: -10px;
right: 0px;
width: ;
height: ;
border: 5px solid transparent;
border-bottom-color: red;
} <div class="jd">
<span></span>
</div>
5.css三角的做法的更多相关文章
- 小技巧-CSS 三角的做法
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- CSS三角的写法(兼容IE6)
目录 简介 优点 原理 1. 先创建一个div 2. 然后给div设定边框. 3. 给div的四个边框都设置不同的颜色 4. 把宽度和高度都变成0 5. 其余角为透明 6. 兼容IE6浏览器 造成这样 ...
- 【27前端】在线css三角
我们都知道利用css边框的属性可以画出三角形,这里为了方便,我做了一个简单的demo页面供大家使用. 在线css三角
- css三角块
html: <div class="angle"></div> css: .angle{ width: 0px; height: 0px; border-b ...
- 不用图片做的三角语言框效果,纯样式编写,css三角样式写法
2010-07-05 19:57:28 博主 回复 用户昵称 在秋日真的有轻柔吧. 上边效果与理想的有误差,代码布不上去,下边是源代码,另行保存后查看真正效果,下图是真正效果,区别在三角处,里面颜 ...
- css 三角实例
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- css 三角
http://peunzhang.github.io/demo/css_angle/index.html
- css 三角图标
.triangle-right{ display: inline-block; width: 0; height: 0; border-top: 6px solid transparent; bord ...
- 案例- CSS 三角加强
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
随机推荐
- 201871010101-陈来弟《面向对象程序设计(Java)》第十一周学习总结
201871010101-陈来弟<面向对象程序设计(Java)>第十一周学习总结 实验九 泛型程序设计技术 实验时间 2019-11-8 第一部分:理论基础知识 1.什么是泛型类 泛型是 ...
- uiautomator 安装和升级
1.打开uiautomator sdk安装路径 < tools < uiautomatorviewer.bat # 双击点开 2.升级uiautomator包 1.uiautomatorv ...
- 莫烦TensorFlow_04 placeholder
import tensorflow as tf input1 = tf.placeholder(tf.float32) input2 = tf.placeholder(tf.float32) outp ...
- Nginx主配置文件说明
#运行用户 user nobody; #启动进程,通常设置成和cpu的数量相等 worker_processes ; #全局错误日志及PID文件 #error_log logs/error.log; ...
- [ZJOI2019]线段树(线段树,DP)
又是神仙题. 要写博客太长了,先咕着.放个代码先. 为什么 fmul 在 linux 底下还被定义过了--能想象到我一发 CE 的绝望吗 qaq #include<bits/stdc++.h&g ...
- Log-Structured Merge Tree (LSM Tree)
一种树,适合于写多读少的场景.主要是利用了延迟更新.批量写.顺序写磁盘(磁盘sequence access比random access快). 背景 回顾数据存储的两个“极端”发展方向 加快读:加索引( ...
- [LeetCode] 674. Longest Continuous Increasing Subsequence 最长连续递增序列
Given an unsorted array of integers, find the length of longest continuous increasing subsequence. E ...
- [LeetCode] 290. Word Pattern 词语模式
Given a pattern and a string str, find if str follows the same pattern. Here follow means a full mat ...
- Spring Cloud Alibaba整合Sentinel流控
前面我们都是直接通过集成sentinel的依赖,通过编码的方式配置规则等.对于集成到Spring Cloud中阿里已经有了一套开源框架spring-cloud-alibaba,就是用于将一系列的框架成 ...
- API加密框架原理解密
关于框架的使用文章请参考: 前后端API交互如何保证数据安全性?:http://cxytiandi.com/blog/detail/20235 API数据加密框架monkey-api-encrypt: ...