我有定位问题。 我的图片如何用文字设置元素的位置
创建星爆和插入文本是这样的:jsfiddle code,但我不能像我的图片right: 0; position: relative
创建元素的定位。 建议我请。 Thnx。
我有定位问题。 我的图片如何用文字设置元素的位置
创建星爆和插入文本是这样的:jsfiddle code,但我不能像我的图片right: 0; position: relative
创建元素的定位。 建议我请。 Thnx。
我认为你需要为你的.starburst5
:
position: absolute;
top: 0;
right: 0;
不要忘了position: relative;
从HTML元素和CSS属性删除。
中使用的相对定位和绝对
定义您父DIVposition relative
和定义孩子
position absolute
像这样
.parent{
position:relative;
padding-right:100px;
}
.starburst5{
position: absolute;
right:0;
top:20px;
}
使用float作为锚点标记和文本,然后给出文本宽度
您尝试移动的确切元素是什么?和(在右边缘)? – vladkras
我尝试移动星爆。是的右边。 – Moldaone