运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> #flex-container { border: 1px solid black; background-color: rgb(255, 230, 251); display: grid; grid-template-columns: repeat(3,1fr); column-gap: 30px; } #flex-container > div { border: 1px solid black; padding: 10px; background-color: lightgreen; } </style> </head> <body> <h1>The column-gap Property with grid</h1> <p>Use the column-gap property to specify the size of the gap between the columns in a grid layout.</p> <p>This grid layout has a 30px gap between the columns:</p> <div id="flex-container"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> <div>7</div> <div>8</div> <div>9</div> <div>10</div> <div>11</div> <div>12</div> <div>13</div> </div> </body> </html>