html - 内联样式没有发挥作用

标签 html css stylesheet dtd

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">



<head>
<title>New Page</title>
</head>
<body>


<input type='text' id='Textbox1' name='Textbox' value='Test' maxlength=20  style='left:194; top:43; width:100; height:32; font-family:Arial; font-style:normal; font-weight:normal; font-size:14; color:#000000; text-align:left; letter-spacing:0; line-height:0; position:absolute; padding:0; margin:0;   ' />
<button  id='4df60b2d1cf696913aec0377' id='Button1' name='Button' style='left:193.5; top:237.5; width:100; height:32; font-family:Arial; font-style:normal; font-weight:normal; font-size:14; color:#000000; text-align:center; letter-spacing:0; line-height:0; position:absolute; padding:0; margin:0; '>Submit</button>
<a name='Anchor' id='Anchor1'href='http://www.google.com' target='_blank' style='left:42.5; top:38.5; width:100; height:32; font-family:Arial; font-style:normal; font-weight:normal; font-size:14; color:#000000; text-align:left; letter-spacing:0; line-height:0; position:absolute; padding:0; margin:0; ' >link</a>
<img name='Img' id='Img1' src='i4.jpg' alt='Image not Display' style='left:79.5; top:195.5; width:100; height:32; font-family:Arial; font-style:normal; font-weight:normal; font-size:14; color:#FFFFFF; text-align:left; letter-spacing:0; line-height:0; position:absolute; padding:0; margin:0; '></img>
</body>
</html>

这段 HTML 代码在左上角的浏览器中出错

最佳答案

请将 px 放在非零数值之后以使其正常工作。

示例:高度:100px;

关于html - 内联样式没有发挥作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6381861/

相关文章:

javascript - 单击元素重新启动 Glide.js

css - 将 DIVS 放在第一个 DIV 下的 av DIV 中

html - 以 Angular 2 在模块级别应用 CSS

php - 数据 :image/gif;base64 Images Not Animated

javascript - 使用来自 JSON 的数据检查单选按钮

javascript - 如果可拖动元素通过其容器,它们将被隐藏

javascript - 登录和滑出格式

javascript - 调整图像大小使其适合特定大小的 Canvas 并保持纵横比

html - 将 div 显示为网格

css - 夫妇打印样式表问题