gpt4 book ai didi

python - Css 背景图像, Tornado 提供的图像

转载 作者:太空宇宙 更新时间:2023-11-04 03:37:06 24 4
gpt4 key购买 nike

我在tornado有一个图片服务器,代码是:

class Index(tornado.web.RequestHandler):
def get(self):
header = "image/png"
ifile = open("image.png","r")
self.add_header("Content-Type",header)
self.write(ifile.read())

我在 <img src="http://localhost:8888/img" /> 中使用了这张图片这工作正常,但在 css 背景图像中调用时不起作用,例如:<div style="background-image:url(http://localhost:8888/img)"></div> .

最佳答案

你的是正确的,但是 dev 的高度是 0 并且对于这个 resean 没有显示。

<div style="background-image:url(http://localhost:8888/img); min-height: 100px; background-repeat: repeat;">&nbsp;</div>

关于python - Css 背景图像, Tornado 提供的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25396515/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com