[英]How to create Textbox Hexagon border?
這是一個有多種背景的想法:
input { width:300px; height:50px; padding:5px; box-sizing:border-box; border:none; outline:0; background: linear-gradient(grey,grey) top /calc(100% - 30px) 1px, linear-gradient(grey,grey) bottom/calc(100% - 30px) 1px, linear-gradient(grey,grey) left /1px calc(100% - 30px), linear-gradient(grey,grey) right /1px calc(100% - 30px), linear-gradient(to bottom right, transparent calc(50% - 1px),grey,transparent calc(50% + 1px)) top left/15px 15px, linear-gradient(to bottom right, transparent calc(50% - 1px),grey,transparent calc(50% + 1px)) bottom right/15px 15px, linear-gradient(to bottom left, transparent calc(50% - 1px),grey,transparent calc(50% + 1px)) top right/15px 15px, linear-gradient(to bottom left, transparent calc(50% - 1px),grey,transparent calc(50% + 1px)) bottom left/15px 15px; background-repeat:no-repeat; }
<input type="text">
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.