【问题标题】:positioning elements with float?..nothing works [closed]用浮动定位元素?..没有任何效果[关闭]
【发布时间】:2012-07-13 08:04:24
【问题描述】:
<div class="block1">
<div class="test">
    <div class="about">This is where text about the app will be displayed</div>
</div>
<div class="app1">
<ul>
<li class="roundabout-moveable-item" style="background: url('img/1.png')"></li>
<li class="roundabout-moveable-item" style="background: url('img/2.png')"></li>
<li class="roundabout-moveable-item" style="background: url('img/3.png')"></li>
</ul>
</div>`

CSS:

.topbox {
width:700px;
height:150px;
border-radius:20px;
position:fixed;
-moz-box-shadow:    inset 0px 4px 8px #000000;
-webkit-box-shadow: inset 0px 4px 8px #000000;
box-shadow:         inset 0px 4px 8px #000000;}

.block1 {
width:800px;}

.about {
float:right;
}

我已经尝试了所有方法,搜索了堆栈溢出,但似乎无法正常工作。

任何帮助都非常感谢谢谢!

【问题讨论】:

  • 你说的是什么透明盒子?
  • 好的...对不起,我是堆栈新手。
  • @user1519581 编辑您的问题并添加代码。不要在评论中发布代码。

标签: html css css-float positioning


【解决方案1】:

试试这个并更改绝对定位的值以满足您的需要。

.block1 {
  width:800px;
  position: relative;
}

.test {
  width:400px;
  height:300px;
  border-radius: 20px;
  background: transparent;
  width:800px;
  position: absolute;
  top: 200px;
  left: 400px;
}

【讨论】:

  • 您的编码知识可能有限,但您的工作看起来很棒!继续加油!
  • 哇,谢谢!这真的意味着很多。这个网站非常棒。是的,我的编码能力非常有限,但我正在努力!谢谢鼓励的话。保持真棒!
猜你喜欢
  • 2011-11-12
  • 1970-01-01
  • 1970-01-01
  • 2016-08-05
  • 1970-01-01
  • 2013-11-30
  • 2023-01-18
  • 2013-08-14
  • 2011-05-11
相关资源
最近更新 更多