如果它们的大小不同,scss上是否可以将多个范围缩小10像素,例如: 一个跨度为top:23像素,另一个跨度为25像素,我需要降低10像素
我尝试使用calc(-10px)但没有运气
<span style="top:23px;">aosidjiasj</span>
<span style="top:29px;">aosidjiasj</span>
<span style="top:19px;">aosidjiasj</span>
<span style="top:20px;">aosidjiasj</span>
我除了减少了10px
<span style="top:13px;">aosidjiasj</span>
<span style="top:19px;">aosidjiasj</span>
<span style="top:9px;">aosidjiasj</span>
<span style="top:10px;">aosidjiasj</span>
答案 0 :(得分:0)
您可以使用def graph(request):
unix_time = int(time())
r = requests.get(f'http://192.168.1.10/graph.php?type=multi-port_bits_duo_separate&idb=393,204,132,31,36,214&to={unix_time}', auth=(USERNAME,PASS), stream=True)
r.raise_for_status()
# the write to file method, works but trying to stream contents into view
#with open(f'{unix_time}.png','wb') as fd:
# for chunk in r.iter_content(chunk_size=50000):
# fd.write(chunk)
context = {'context': r.content}
return render(request, 'live_graph.html', context)
(如果显示类型不是内联)
transform: translateY(-10px);