源代码 :
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>开源教程(ossoft.cn)</title> <style> .container { position: relative; } .bottomleft { position: absolute; bottom: 8px; left: 16px; font-size: 18px; } img { width: 100%; height: auto; opacity: 0.3; } </style> </head> <body> <h2>图片文本</h2> <p>在图片左下角添加文本信息:</p> <div class="container"> <img src="https://www.runoob.com/wp-content/uploads/2016/04/trolltunga.jpg" alt="Norway" width="1000" height="300"> <div class="bottomleft">左下角</div> </div> </body> </html>
运行结果