Html Can';不能动元素1,为什么?
我已经尝试为#element1、所有h1等创建css规则,但我仍然可以移动除#element1之外的所有对象。有什么我遗漏的吗Html Can';不能动元素1,为什么?,html,css,position,absolute,Html,Css,Position,Absolute,我已经尝试为#element1、所有h1等创建css规则,但我仍然可以移动除#element1之外的所有对象。有什么我遗漏的吗 <style> h1{ position:absolute; top:3000; } </style> </head> <body> <img src="http://s7.postimg.org/qk0paqnob/cooltext1191
<style>
h1{
position:absolute;
top:3000;
}
</style>
</head>
<body>
<img src="http://s7.postimg.org/qk0paqnob/cooltext119178095664811.jpg">
<h2 class="post1">Web Design</h2>
<h2 class="post2">App Development</h2>
<h2 class="post3">IT Consulting</h2>
<h2 class="post4">Tech Support</h2>
<div id="1">
<h1 id="element1">Web Design</h1>
<p>Gunlogson is a small developmental technology business that focused of promotional projects for small bussinesses.</p>
</div>
<h1 id="element2">App Development</h1>
<h1 id="element3">IT Consulting</h1>
<h1 id="element4">Tech Support</h1>
</body>
h1{
位置:绝对位置;
top:3000;
}
网页设计
应用程序开发
IT咨询
技术支持
网页设计
Gunlogson是一家小型开发性技术企业,专注于小型企业的推广项目
应用程序开发
IT咨询
技术支持
您需要将其更改为3000px
h1{
position:absolute;
top:3000;
}
到
你需要把这个换成3000px
h1{
position:absolute;
top:3000;
}
到
作为@Imgonzalves所说内容的补充:定义尺寸时,还必须定义单位(除非值为零)。作为@Imgonzalves所说内容的补充:定义尺寸时,还必须定义单位(除非值为零)。