实例(CSS固定定位制作广告HTML代码)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>固定定位-广告位设计</title> <link rel="stylesheet" href="static/css/gudingdingwei.css"> <style> body { background-color:lightgray; height: 2000px; } .ads { width: 320px; height: 200px; background-color: aqua; position: fixed; right: 0; bottom: 0; } .ads button { float: right; margin-right: 15px; } </style> </head> <body> <h1>实现广告位</h1> <div class="ads"> <button onclick="this.parentNode.style.display = 'none'">关闭</button> <h2>广告牌招商:电话123456</h2> <h1>招商进行中...</h1> </div> </body> </html>
点击 "运行实例" 按钮查看在线实例