zuozuo168
zuozuo168
  • 发布:2016-03-03 14:34
  • 更新:2016-10-25 16:50
  • 阅读:2118

创建子页面top和bottom能否支持 em、rem这类型单位?

分类:HTML5+

建子页面top和bottom能否支持 em、rem这类型单位? 设置PX单位不好适配不同分辨率的屏幕!

var subpage_style = {  
                top: '64px',  
                bottom: '50px',  
                background:'transparent',  
                bounceBackground:'url(include/images/bg.png)',  
                bounce: 'vertical',  
                scrollIndicator: 'none'  
            };

var subpage_style = {  
                top: '64rem',  
                bottom: '50rem',  
                background:'transparent',  
                bounceBackground:'url(include/images/bg.png)',  
                bounce: 'vertical',  
                scrollIndicator: 'none'  
            };

建议官方考虑下这个问题!!! 现在用相对单位来适配不同手机尺寸已经是主流了!!!

2016-03-03 14:34 负责人:无 分享
已邀请:
DCloud_UNI_FXY

DCloud_UNI_FXY

仅支持百分比,像素值,em和rem建议自己计算转换成px

  • 乔军

    请问转化成px如何做不同屏幕的适配

    2018-07-21 22:46

1***@qq.com

1***@qq.com

单用px怎么做适配啊

该问题目前已经被锁定, 无法添加新回复