W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <head> <style> .container { position: relative; } .topleft { position: absolute; top: 8px; left: 16px; font-size: 18px; } img { width: 100%; height: auto; opacity: 0.3; } </style> </head> <body> <h1>图像文本</h1> <p>在图像左上角添加一些文本:</p> <div class="container"> <img src="/i/logo/w3logo-2.png" alt="W3School" width="800" height="450"> <div class="topleft">Top Left</div> </div> </body> </html>