代码
提交代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .demo:before{ content: ''; display:inline-block; width:12px; height:12px; font-size:12px; line-height:12px; background: url(//img.mukewang.com/wiki/5eea2f6809a8d35e00400040.jpg) center no-repeat; background-size: cover; } </style> </head> <body> <div class="demo">慕课网</div> </body> </html>
运行结果