我正在尝试在用户单击输入(iOS)时禁用放大。我已经尝试了很多类似的东西:
将字体大小强制为16像素;
修改视口user-scalable=no
似乎任何东西都可以在最新版本的iOS中使用。
你能帮我吗?
谢谢!
编辑:我想允许用户根据需要进行缩放。我想防止用户单击输入时的自动自动缩放。
答案 0 :(得分:0)
尝试用viewport代替:
class MyAdminClass(admin.ModelAdmin):
def get_list_editable(self, request):
"""
get_list_editable method implementation,
django ModelAdmin doesn't provide it.
"""
dynamically_editable_fields = ('name', 'published', )
return dynamically_editable_fields
def get_changelist_instance(self, request):
"""
override admin method and list_editable property value
with values returned by our custom method implementation.
"""
self.list_editable = self.get_list_editable(request)
return super(MyAdminClass, self).get_changelist_instance(request)
答案 1 :(得分:0)
将此添加到您的HTML:
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">