实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>QQ客服</title> <style> *{ margin: 0px; padding: 0px; } body{ height: 3000px; } .ads{ position: fixed; right: 0px; top: 50%; margin-top: -100px; } .ads-ys1{ width: 100px; height: 100px; background-color: #5647dc; } .ads-ys2{ width: 100px; height: 100px; background-color: #dc1a94; margin-top: 2px; } </style> </head> <body> <h1>腾讯网首页</h1> <div class="ads"> <div class="ads-ys1"> <h2>qq客服1</h2> </div> <div class="ads-ys2"> <h2>qq客服2</h2> </div> </div> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例