目次一覧
状態:-
閲覧数:138
投稿日:2024-03-15
更新日:2024-06-06
チェック柄
CSSでストライプなどの背景パターンを作る方法|tamatuf
斜め線
body{
background-color: #fff;
background-image: linear-gradient(90deg, rgba(194, 168, 204, .5) 50%, transparent 50%),
linear-gradient(rgba(194, 168, 204, .5) 50%, transparent 50%);
background-size: 40px 40px;
}
CSSでストライプなどの背景パターンを作る方法|tamatuf
斜め線
pre {
padding: .4em .8em;
margin: .5em 0;
overflow: auto;
background-image: url("data:image/svg+xml;charset=utf-8,<svg%20version%3D'1.1'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'100'%20height%3D'100'%20fill%3D'rgba(0%2C0%2C0%2C.2)'>%0D%0A<polygon%20points%3D'0%2C50%2050%2C0%200%2C0'%20%2F>%0D%0A<polygon%20points%3D'0%2C100%2050%2C100%20100%2C50%20100%2C0'%20%2F>%0D%0A<%2Fsvg>");
background-size: 1em 1em;
}