javascript - css 三角形缺口,
问题描述
如图:
这个三角形缺口是透明的,请问咋个实现
大家请注意问题的关键,三角形能看见后面的背景
问题解答
回答1:我之前的做法是在导航栏上弄弄多一行小小几px高的p的全是白色背景被选中的那个背景为一种透明“有缺口白色背景”图片
回答2:p { width: 0; height: 0; border: 10px solid #fff; border-top-color: transparent;}回答3:
透明的三角形大概是做不出来的。
但你可以做两个白色的梯形,留出中间那个三角形的位置就行了。
回答4:用border修饰实现三角形,想要透明用rgba
p{
width: 0;height: 0;border: 10px solid transparent;border-top-color: rgba(0,0,0,0.4)
}
回答5:页面地址发出来,研究一下就知道了
回答6:同意小U酱的说法,我也只想到这一个办法:
——————————————华丽的分割线———————————————用rotate做出来的效果:
p::before { content: ''; display: block; position: absolute; bottom: 0; left: -10px; width: 20px; /*自己调*/ border: 10px solid transparent; border-bottom-color: white;}p::after { content: ''; display: block; position: absolute; bottom: 0; right: -10px; width: 88px; /*自己调*/ border: 10px solid transparent; border-bottom-color: white;}
相关文章:
1. docker镜像push报错2. docker images显示的镜像过多,狗眼被亮瞎了,怎么办?3. 如何解决Centos下Docker服务启动无响应,且输入docker命令无响应?4. docker api 开发的端口怎么获取?5. 如何解决docker宿主机无法访问容器中的服务?6. macos - mac下docker如何设置代理7. 老师,flex-shrink: 1; 按视频操作,不会自动缩放8. python - 怎样在linux下开发flask web应用时查看代码出错(traceback)的地方。9. 前端 - 类到底该如何去命名 .newsList 这种的命名难道真的不是过度语义化吗?~10. PHP中的$this代表当前的类还是方法?

网公网安备