|
半透明边框
- border:10px solid hsla(0, 0%, 100%,.5);
- background-clip:padding-box;
复制代码
缝边效果
- outline: 1px white dashed;
- outline-offset:-10px;
- border-radius:4%;
- background:#795548;
复制代码
边框内圆角 可用于图标展示
- border-radius:10px;
- background: tan;
- outline:10px solid #655;
- box-shadow:0 0 0 5px #655;
复制代码
信封边框
- padding:1em;
- border: 1em solid transparent;
- background: linear-gradient(white,white) padding-box,repeating-linear-gradient(-45deg, red 0, red 12.5%, transparent 0, transparent 25%, #58a 0, #58a 37.5%, transparent 0, transparent 50%) 0/5em 5em;
复制代码
注脚效果
- padding-top:1em;
- border-top: .2em solid transparent;
- border-image: 100% 0 0 linear-gradient(90deg,currentColor 4em,transparent 0);
复制代码
动画蚂蚁线
- @keyframes ants{100%{background-position:100%;}}
- div{
- width:200px;
- height: 70px;
- border: 1px solid transparent;
- background: linear-gradient(white,white) padding-box,repeating-linear-gradient(-45deg, black 0, black 25%, white 0, white 50%) 0/.6em .6em;
- animation:ants 12s linear infinite;
- }
复制代码 |
|