一个创建元素的问题! 新手同问,这个有没有可能是样式默认的margin,border属性值不为0导致的? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不知道楼中的“中间会空出一大段出来”是什么意思?是image跟span中间,还是因为span向右偏得太多?如果是image跟span的问题, 将span嵌套在bottom里不就解决了吗?如果是span向右偏得太多, 修改span1的left值 span是嵌套在bottom里面的 你仔细看看且也不是因为span偏得太多你把left:240px 改成24px看一下! <style type="text/css"><!--body,td,th { font-size: 12px;}#oo{width:300px;height:30px;border:1px solid #000000;}.bottom{background-image:url(http://mat1.qq.com/ent/ent2007/ent2-02.gif);width:328px;height:31px;}.span1{cursor:hand;position:absolute;top:260px;float:left;width:13px;height:19px;left:240px;background-image:url(http://mat1.qq.com/ent/ent2007/ent2-04.gif);}--></style><script>function ss(){var bian= document.getElementById("oo")var xx=document.createElement("img")xx.setAttribute("id","image");xx.setAttribute("src","http://mat1.qq.com/ent/upday2008/06182.jpg")//xx.className="image"bian.appendChild(xx)var xx1=document.createElement("div")xx1.setAttribute("id","bottom");xx1.className="bottom"bian.appendChild(xx1)var bottom= document.getElementById("oo")var xx2=document.createElement("span")xx2.setAttribute("id","num1")bottom.appendChild(xx2)xx2.className="span1"}</script><body onload="ss()"><div id="oo"></div></body> 不大明白吗只能用浮动层来绝对定位吗?span是bottom的子元素应该可以控制span在bottom里面的位置的如果这么改 应该怎么修改了梁超兄 指教下! 关于jquery ui 的dialog使用问题 javascript一直很想明白的问题 已知一个圆的直径(200)和圆心坐标(100,100),要把这个圆平均分成8份,如何求得 8个分割点的坐标? 火狐FF支持execCommand吗? 求联想网站的产品展示的代码 站长工具那种功能怎么实现呢? 求web拖拽源码 我怎么取得到服务器的时间,日期,星期呢? 问题:如何在页面上作序号的增加 如何将%xx%xx%xx转换成全角字符? 回调函数为什么获取不到对象? javascript除了做网页还能做什么
是image跟span中间,还是因为span向右偏得太多?
如果是image跟span的问题, 将span嵌套在bottom里不就解决了吗?
如果是span向右偏得太多, 修改span1的left值
且也不是因为span偏得太多
你把left:240px 改成24px看一下!
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
#oo{
width:300px;
height:30px;
border:1px solid #000000;
}.bottom{background-image:url(http://mat1.qq.com/ent/ent2007/ent2-02.gif);
width:328px;
height:31px;
}
.span1{
cursor:hand;
position:absolute;
top:260px;
float:left;
width:13px;
height:19px;
left:240px;
background-image:url(http://mat1.qq.com/ent/ent2007/ent2-04.gif);
}
-->
</style>
<script>
function ss(){
var bian= document.getElementById("oo")
var xx=document.createElement("img")
xx.setAttribute("id","image");
xx.setAttribute("src","http://mat1.qq.com/ent/upday2008/06182.jpg")
//xx.className="image"
bian.appendChild(xx)
var xx1=document.createElement("div")
xx1.setAttribute("id","bottom");
xx1.className="bottom"
bian.appendChild(xx1)
var bottom= document.getElementById("oo")
var xx2=document.createElement("span")
xx2.setAttribute("id","num1")bottom.appendChild(xx2)
xx2.className="span1"
}
</script>
<body onload="ss()">
<div id="oo"></div></body>
只能用浮动层来绝对定位吗?
span是bottom的子元素
应该可以控制span在bottom里面的位置的
如果这么改 应该怎么修改了
梁超兄 指教下!