Python 布局:屏幕适配以及rem

Python021

Python 布局:屏幕适配以及rem,第1张

一、视口

二、视网膜屏幕(retina屏幕)清晰度解决方案

三、background 新属性 ( background-size: )

四、适配布局类型

五、基于 rem 的布局

base = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,'A','B','C','D','E','F']

def dec2hex(string_num):

num = int(string_num)

li = []

while True:

if num == 0: break

num,rem = divmod(num, 16)

li.append(base[rem])

return ''.join([str(i) for i in li[::-1]])