我有一个简单的div,其内联样式为max-width:100%;
。该文档类型为<!DOCTYPE HTML>
,但Chrome控制台将其标记为无效的属性值(Chrome版本:67.0.3396.99)。您可以检查以下代码段输出:
<div id="signupDiv" style="width:300px;max-width:l00%;margin:auto">
Inspect the problem here
</div>
答案 0 :(得分:2)
您的代码
<div id="signupDiv" style="width:300px;max-width:l00%;margin:auto">
Inspect the problem here
</div>
更新的代码
<div id="signupDiv" style="width:300px;max-width:100%;margin:auto">
Inspect the problem here
</div>
拼写错误与100%
答案 1 :(得分:-1)
一切都很好,只是有错字
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">
<servlet>
<servlet-name>ListenerTester</servlet-name>
<servlet-class>com.example.web.ListenerTester</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ListenerTester</servlet-name>
<url-pattern>/ListenTest.do</url-pattern>
</servlet-mapping>
<context-param>
<param-name>breed</param-name>
<param-value>Beta</param-value>
</context-param>
<listener>
<listener-class>
com.example.web.MyServletContextListener
</listener-class>
</listener>
</web-app>
在这里检查问题