[CSS]repeatで背景画像の縦と横で繰り返しを指定する

2021年10月4日

書式
background: url(./img/xxx.png) repeat;
使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<style>
.cft {
background: url(./img/test.png) repeat;
height: 150px;
width: 250px;
border: 1px solid #000;
}
</style>
<div class="cft"></div>
<style> .cft { background: url(./img/test.png) repeat; height: 150px; width: 250px; border: 1px solid #000; } </style> <div class="cft"></div>
<style>
  .cft {
    background: url(./img/test.png) repeat;
    height: 150px;
    width: 250px;
    border: 1px solid #000;
  }
</style>
<div class="cft"></div>

 

CSS

Posted by arkgame