css - css 选择器在使用 boostrap 时不起作用
问题描述
我正在尝试使用引导程序进行简单设计...但是,我遇到了一个问题,即每次我想从 CSS 中为某些元素添加一些编辑时,似乎没有任何变化,这很奇怪,因为一开始,它工作正常,但由于任何原因,它停止工作。这是 PHP 文件中的一段代码:
<div class="popupbox d-flex flex-column top-0 justify-content-center position-fixed border border-2 border-dark">
<p class="mensaje text-center">hola</p>
</div>
<div class="background">
<div class="contenedor">
<div class="contenedor-margen container p-5">
<div class="separacion">
<h2 class="form_titulo text-center">Registrar</h2>
</div>
</div>
</div>
在这里,我正在尝试使用以下代码编辑弹出框:
.popupbox{
width: 500px;
height: 200px;
background: red;
}
.background{
width: 100%;
height: 100vh;
background:#171717;
display: flex;
flex-direction: row;
}
.contenedor{
height: 100%;
width: 40%;
background: #EDEDED;
display: flex;
flex-direction: column;
justify-content: center;
overflow: hidden;
}
正如我之前所说,CSS 选择器工作得非常好,我可以通过元素.background 和 .contenedor 来判断。还有两件事要说:使用属性style="background:red; width:500px; height:200px;" 它可以工作,但不能在 CSS 文件中,当我想删除 CSS 中任何元素的属性时,它无法删除......我不明白这个
解决方案
推荐阅读
- c# - 解决连接字符串问题
- javascript - 如何使用 React 倒计时 180 秒到 03:00 倒计时?
- java - org.json.JSONObject kotlin vs java
- javascript - 如何订阅 Observable Forkjoin 数组不起作用
- android - 当我在 Redmi 7A 上启动相机拍照时应用程序崩溃。也无法在 UncaughtException 处理程序中捕获崩溃
- angular - 默认选择值 Ng-Zorro
- python - 为什么“Git add *”会保留一些文件未暂存?
- python - 如何获取 Python 脚本的可执行文件以在 Windows 中使用 anaconda 环境运行?
- c# - 如何在 radGridView WinForm 中更改搜索行文本框的占位符?
- ruby - ruby on rails 中的类和模型