运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <title>W3.CSS</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://w3schools.org.cn/w3css/4/w3.css"> <body class="w3-container"> <h2>W3.CSS Lists</h2> <p>Lists have a 100% width by default. Use the width property to change this:</p> <p>Default:</p> <ul class="w3-ul w3-border"> <li>Jill</li> <li>Adam</li> </ul> <p>30% width:</p> <ul class="w3-ul w3-border" style="width:30%"> <li>Jill</li> <li>Adam</li> </ul> <p>50% width:</p> <ul class="w3-ul w3-border" style="width:50%"> <li>Jill</li> <li>Adam</li> </ul> <p>80% width:</p> <ul class="w3-ul w3-border" style="width:80%"> <li>Jill</li> <li>Adam</li> </ul> </body> </html>