前端 - 能不能用 CSS3 画出以下图形?感谢!
问题描述
图形如下,就是一个大阔号,箭头向下。但非前端专业,做的时候自己无从下手,希望高手指点。谢谢。

如果不能,那只能用图片了。用图片无法方便控制长度,比较麻烦。
问题解答
回答1:http://codepen.io/lizzz0523/pen/Xmqzxw
回答2:@lizzz_led 的回答很棒。
我也来贡献个答案吧。主要是减少输入的计算变量,只需考虑修复 .quote 的高度以及圆角的宽度
<p class='quote'><p></p></p> <style type='text/css'> .quote {position: relative;width: 100%; /* any width */height: 40px;/* fix zero height */ } .quote::before, .quote::after, .quote ::before, .quote ::after {content: ’’;display: block;position: absolute;width: calc(50% - 20px);height: 20px;border-style: solid;border-color: #000;border-width: 0; } .quote ::before, .quote ::after {top: 0;border-bottom-width: 1px; } .quote::before, .quote::after {top: 20px;border-top-width: 1px; } .quote ::before {left: 0;border-bottom-left-radius: 20px; } .quote ::after {right: 0;border-bottom-right-radius: 20px; } .quote::before {left: 20px;border-top-right-radius: 20px; } .quote::after {right: 20px;border-top-left-radius: 20px; } </style>回答3:
不能, 能用 canvas 实现, 画2跟赛贝尔曲线就行了。建议还是用图片吧。
回答4:还是用图片吧。。。
回答5:用图片吧,居中显示, 两侧的上翘部分用before,after调试一下吧. 这样也就最大程度上适应了吧
回答6:即使用图片,拉长变形了,也不难看吧
回答7:是我孤陋寡闻,ccs3什么鬼,只用过css3
相关文章:
1. javascript - 修改表单多选项时和后台同事配合的问题。2. docker绑定了nginx端口 外部访问不到3. dockerfile - [docker build image失败- npm install]4. docker安装后出现Cannot connect to the Docker daemon.5. javascript - 怎么实现点击表格中的某一行然后就在表单处出现表格中的对应的属性值啊6. macos - mac下docker如何设置代理7. redis - 究竟是选择微信小程序自带的统计工具还是自己开发一个数据统计的代码?8. dockerfile - 我用docker build的时候出现下边问题 麻烦帮我看一下9. angular.js使用$resource服务把数据存入mongodb的问题。10. css - 使用blur()滤镜为什么有透明的效果

网公网安备