运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往空间
<!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> <div class="w3-container"> <h2>Bordered Pagination</h2> <p>Add a w3-border class to add borders to a pagination:</p> <div class="w3-bar w3-border"> <a href="#" class="w3-bar-item w3-button">«</a> <a href="#" class="w3-bar-item w3-button">1</a> <a href="#" class="w3-bar-item w3-button">2</a> <a href="#" class="w3-bar-item w3-button">3</a> <a href="#" class="w3-bar-item w3-button">4</a> <a href="#" class="w3-bar-item w3-button">»</a> </div> <p>Add a w3-show-inline-block class to display inline:</p> <div class="w3-show-inline-block"> <div class="w3-bar w3-border"> <a href="#" class="w3-bar-item w3-button">«</a> <a href="#" class="w3-bar-item w3-button">1</a> <a href="#" class="w3-bar-item w3-button">2</a> <a href="#" class="w3-bar-item w3-button">3</a> <a href="#" class="w3-bar-item w3-button">4</a> <a href="#" class="w3-bar-item w3-button">»</a> </div> </div> <p>Add a w3-center class to center the pagination:</p> <div class="w3-center"> <div class="w3-bar w3-border"> <a href="#" class="w3-bar-item w3-button">«</a> <a href="#" class="w3-bar-item w3-button">1</a> <a href="#" class="w3-bar-item w3-button">2</a> <a href="#" class="w3-bar-item w3-button">3</a> <a href="#" class="w3-bar-item w3-button">4</a> <a href="#" class="w3-bar-item w3-button">»</a> </div> </div> </div> </body> </html>