数値は適宜調整してください。
CSS
1h1 {
2 display: inline-block;
3 padding: 0.8em 1.2em;
4 position: relative;
5}
6
7h1::before,
8h1::after {
9 content: '';
10 width: 25%;
11 height: 30%;
12 position: absolute;
13}
14
15h1::before {
16 top: 0;
17 left: 0;
18 background: linear-gradient(to bottom, transparent 15%, #666 15%, #666 calc(15% + 1px), transparent calc(15% + 1px)),
19 linear-gradient(to right, transparent 15%, #666 15%, #666 calc(15% + 1px), transparent calc(15% + 1px));
20}
21
22h1::after {
23 right: 0;
24 bottom: 0;
25 background: linear-gradient(to left, transparent 15%, #666 15%, #666 calc(15% + 1px), transparent calc(15% + 1px)),
26 linear-gradient(to top, transparent 15%, #666 15%, #666 calc(15% + 1px), transparent calc(15% + 1px));
27}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/10/23 08:32