<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>固定广告</title> <style> .advertise-left { width:200px; height:300px; background:#333; position:fixed; left:0; top:200px; } .advertise-right { width:200px; height:300px; background:#333; position:fixed; right:0; top:200px; } .advertise-left p,.advertise-right p { font-size:14px; color:#fff; text-align:center; } .content{ width:1200px; height:50%; background:#f00; margin:0 auto;} .content1{ width:1200px; height:50%; background:green; margin:0 auto;} </style> </head> <body style="height:2000px"> <div class="advertise-left"> <p> 跟着朱老师学习真带劲!!! </p> </div> <div class="content"></div> <div class="content1"></div> <div class="advertise-right"> <p> 跟着朱老师学习真带劲!!! </p> </div> </body> </html>