- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正试图将我的右侧 div 包裹在我的左侧,呈倒月亮形状?这是它现在的样子。
我想要做的是让红色 block 环绕黑色 block 的圆 Angular 。这是当前的 HTML/CSS 代码,如果 CSS 代码有点“困惑”,我深表歉意,因为我已经尝试过不同的代码。
HTML
<div class="container full-width">
<div class="row proj">
<div class="col-md-8 full-width">
<div class="content">
</div>
</div>
<div class="col-md-4 full-width">
<div class="options">
</div>
</div>
</div>
</div>
CSS
.content {
margin-top: 75px;
position: relative;
width: 70vw;
max-width: 100%;
height: 90vh;
max-height: 100%;
overflow: hidden;
background-color: black;
border-radius: 0 50vw 50vw 0;
}
.options {
margin-top: 75px;
position: relative;
width: 30vw;
max-width: 100%;
height: 90vh;
max-height: 100%;
overflow: hidden;
background-color: red;
}
.container .full-width{
padding-left: 0;
padding-right: 0;
overflow-x: hidden;
}
更新
已找到答案,感谢您的帮助,因此不得不根据您发布的代码稍微调整一下代码,现在看起来像这样。
.content {
margin-top: 75px;
width: 30vw;
height: 90vh;
overflow: hidden;
background-color: black;
border-radius: 0 50vw 50vw 0;
float:left;
position:relative;
z-index:2;
}
.options {
margin-top: 75px;
margin-left:3%;
position:relative;
float:right;
width: 30vw;
height: 90vh;
max-height: 100%;
overflow: hidden;
background-color: red;
}
.container .full-width{
position: absolute;
padding-left: 0;
padding-right: 0;
}
最后的结果是这样的,会再调整一下位置,但结果是我想要的,再次感谢。
更新 2
好吧,不得不再做一次编辑,出于某种原因我不得不将它们都向左浮动。否则,如果我保持红色 div 向右浮动并尝试扩大其宽度,它会向左扩大,知道为什么吗?当前代码:
.content {
margin-top: 75px;
width: 44vw;
height: 90vh;
overflow: hidden;
background-color: black;
border-radius: 0 50vw 50vw 0;
float:left;
position:relative;
z-index:2;
}
.options {
margin-top: 75px;
margin-left:20%;
position:relative;
float:left;
width: 50vw;
height: 90vh;
max-height: 100%;
overflow: hidden;
background-color: red;
}
.container .full-width{
position: absolute;
padding-left: 0;
padding-right: 0;
}
最佳答案
使用position:relative;对于 content
和 position:absolute;对于选项
.content {
width: 30vw;
height: 90vh;
overflow: hidden;
background-color: black;
border-radius: 0 50vw 50vw 0;
float:left;
position:relative;
z-index:2;
}
.options {
margin-left:3%;
position:absolute;
float:right;
width: 30vw;
height: 90vh;
max-height: 100%;
overflow: hidden;
background-color: red;
}
<div class="container full-width">
<div class="row proj">
<div class="col-md-8 full-width">
<div class="content">
</div>
</div>
<div class="col-md-4 full-width">
<div class="options">
</div>
</div>
</div>
关于html - 将右边的 div 包裹在左边的 div 周围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42081508/
我想了解如何正确地从 Parcel 中读取空值。让我们看看我的用例: public class MyModel implements Parcelable { private Long id;
好吧,我知道我必须使用 JDBC 等,但我不确定如何将 jar 实现到我的代码中,我有一个基本代码来打开文件等,但我如何才能真正将 sqlite jar 与我的 java 一起合并类文件可以在任何地方
我想知道是否可以打包(或序列化)ClassLoader 以通过 Message 将其发送到 Android 中的另一个进程。 ClassLoader没有实现 Parcelable/Serializab
在上传到我的域时尝试让我的 SVG 出现在浏览器中时,我 - 类似于我拥有 的其他项目包裹安装 - 创建了一个 静态文件夹 我会将 SVG 文件放入的位置。它现在出现在浏览器中,但是,正在播放的“绘图
我有这样的东西: 我希望以最简单的方式实现这样的事情:
当我们使用一个独立的函数语句作为 IIFE 时,我们需要用 () 包装它以使其工作 // IFFE (function a(){ console.log('Hello') }()); // I
我正在为 WCF 开发一个 Java 客户端,并且模板运行良好。我最初使用的是 eclipse 的 Web 服务客户端项目,但后来发现 android 平台不支持所需的库。当时我打算使用 ksoap,
我希望将整行变为可点击。现在行看起来像 Group Obj
我有以下标记(使用 Bootstrap 4): .resource{ border:1px solid red; } tes
#parent{ max-width:1100px; margin: auto; border: 1px solid red; padding: 40px; } #ch
我正在尝试用自定义指令包裹 Angular 带的弹出框。 弹出窗口应该能够使用由使用我的指令的人提供的自定义模板,并且该模板应该能够使用 Controller 的范围。 对于范围部分,我发现我可以将
我有一个 HTML 页面,其中一个 div 包含另一个包含数据库(聊天系统)中所有用户的 div,但是 ul li 标签没有占用父 div 的整个宽度。这是预期结果的图像:http://prntscr
我正在尝试通过套接字将包裹发送到 Android 应用程序。客户端在 libbinder(c++) 中,服务器是一个必须重建包裹的 android 应用程序。我一直在寻找解决方案有一段时间了,但我不知
当我部署一个网站(有多个入口点,许多 HTML 文件)并且主机使用构建命令时:parcel build index.html aboutme.html。部署的网站给我一个 404 错误。但是,如果我在
在 Quarkus 中,异常映射器返回的实体似乎被包装在另一个实体中。 提供一个 JAX-RS 异常映射器,例如: @Provider public class WebhookExceptionMap
如果我设置 textLayer.wrapped = YES , 如何调整大小 textLayer包含包装的文本?即,我如何获得 textLayer 的新高度? 基本上,我想要类似 -[UILabel
您好,如果类有 anchor ,我会尝试用 anchor 包裹图像。 jQuery: if ( $(".views-row:has(a)").length) { var noderef = $
所以,我以前多次使用 Parcel,我从来没有遇到过问题。 这一次它抛出了一些关于 SemVer 版本控制的愚蠢错误,我真的很想找到解决这个问题的解决方案。 我开始了新项目:安装了 npm w/npm
我将 Kotlin 与 Anko 一起使用,我想向另一个 Activity 发送玩家列表。 class Player(var name: String?) { var score: Int = 0 i
我正在尝试使用 Parcelable 通过 Activity 传递数据。这是我的代码: public class Player implements Parcelable { public stati
我是一名优秀的程序员,十分优秀!