- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我想使用 flex box 在我的页面中央创建一个由 4 个 block 组成的正方形(如网格),但它一直给我一个 1 长方形列我可以做些什么来改变它我尝试调整大小但是dosnt 工作,我不知道我的代码中是否有任何其他 css 导致它出现故障,但任何输入都会有所帮助提前感谢
CSS `@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,800,700,300);
@import url(https://fonts.googleapis.com/css?family=Squada+One);
Body {
/*background-color:rgb(28, 18, 63);*/
background-repeat: no-repeat;
background-image: url("https://www.3d-wallpapers.info/wp-content/uploads/3D-Car-Wallpaper.jpg");
background-attachment: fixed;
}
.div-header {
background-image: url("http://hdwpro.com/wp-content/uploads/2017/09/Art-Metal-Wallpaper.jpg");
border: 2px solid red;
height: 250px;
}
h2,
h1 {
color: green;
}
.formdiv {
border: 2px solid red;
width: 20%;
float: right;
}
H2 {
margin: 20px auto;
color: rgb(151, 1, 1);
font-size: 3.26em;
line-height: 1.5;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, .1), 0 0 5px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .3), 0 3px 5px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .25), 0 10px 10px rgba(0, 0, 0, .2), 0 20px 20px rgba(0, 0, 0, .15);
}
.sitename {
border: 2px solid red;
width: 40%;
height: 245px;
size: 2.23em;
float: right;
}
.container {
color: rgb(255, 255, 255);
padding: 0px;
border: 1px red solid;
width: 100%;
height: 600px;
}
.item {
/*color:red;
text-align: center;
margin:5px;
background: oldlace;
width:50%;;
width: 40%;
justify-content: center;*/
width: 40vw;
height: 20vw;
margin: 5px;
background-color: red;
}
.hyper {
background-image: url("http://itsmyideas.com/wp-content/uploads/2013/02/Bugatti-Veyron-2013-2014-Model-picture-with-price-details-520x266.jpg");
background-repeat: no-repeat;
height: 400px;
object-fit: contain;
}
.sport {
background-image: url("C:/carwebsite/Images/mustty2.jpg");
background-repeat: no-repeat;
height: 400px;
}
.exotic {
background-image: url("C:/carwebsite/Images/lamb32.jpg");
background-repeat: no-repeat;
height: 400px;
}
.classic {
background-image: url("C:/carwebsite/Images/must5 (1).jpg");
background-repeat: no-repeat;
height: 400px;
}
.container2 {
justify-content: center;
height: 65px;
background-color: rgb(10, 7, 2);
padding-top: 0px;
width: 100%;
}
.container2 {
justify-content: center;
height: 65px;
background-color: rgb(10, 7, 2);
padding-top: 0px;
width: 100%;
}
.nav {
color: rgb(255, 255, 255);
padding: 15px;
margin: 5px;
background: rgba(14, 11, 6, 0);
margin: 20px;
border-radius: 5px;
list-style: none;
text-align: center;
padding-bottom: 30px;
display: inline;
flex-grow: initial;
}
iframe {
border: 1px solid red;
width: 30%;
}
.youvideo {
margin: 20px auto;
width: 100%;
border: 1px solid red;
justify-content: right;
padding-top: 50px
}
.button {
color: green;
text-align: center;
padding: .625em 1.25em;
background: blueviolet;
border-radius: .35em
}
@media (max-width: 1025px) {
iframe {
width: 250px;
}
.container {
display: flex;
flex-flow: wrap;
height: 250px;
width: 75%;
flex-wrap: wrap;
}
.item {
flex-basis: 0;
height: 150px;
padding-top: 0px
}
}
css flexbox `.container {
/*display: flex;
justify-content: center;
height: 30;
flex-wrap: wrap;
margin: 20px auto;
*/
display: flex;
flex-wrap: wrap;
}
.item {
color: red;
text-align: center;
padding: 15px;
margin: 5px;
background: oldlace;
width: 25%;
justify-content: center;
margin-top: auto;
}
.container2 {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.nav {
flex-basis: 200px;
}
.youvideo {
display: flex;
}
.div-header {
display: flex;
}
.div-header {
display: flex;
}
<!DOCTYPE html>
<HTML>
<body>
<link rel="stylesheet" href="C:\workbenchPrac\prac.css">
<link rel="stylesheet" href="C:\carwebsite\flexobox.css">
<div class="div-header">
<header class="head-image">
<div class="formdiv">
<form action="index.html" method="POST">
<h1>LOG-IN</h1>
<input type="email" id="mail" name="user-email">
<input type="password" id="password" name="user-password">
</div>
<div class="sitename">
<h2>Allmotors<br>alliance</h2>
</div>
</div>
</header>
</div>
<div class="container2">
<ul>
<li class="nav">upcoming races</li>
<li class="nav">shows</li>
<li class="nav">News</li>
<li class="nav">new Releases</li>
</ul>
</div>
<div class="youvideo">
<iframe width="560" height="315" src="https://www.youtube.com/embed/2UKdf0ot0wA?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<div class="container">
<div class="hyper item"><a class="button">hyper</a></div>
<div class="sport item"><a class="button">hyper</a></div>
<div class="exotic item"><a class="button">hyper</a></div>
<div class="classic item"><a class="button">hyper</a></div>
</div>
</body>
</HTML>
最佳答案
希望这就是您要找的。
.main-container{display:flex; min-height:400px; background:red; }
.inner-first-items{flex:1; display:flex; flex-direction:column; }
.inner-square-div{flex:1; border:1px solid #000; text-align:center; }
<div class="main-container">
<div class="inner-first-items">
<div class="inner-square-div">1</div>
<div class="inner-square-div">2</div>
</div>
<div class="inner-first-items">
<div class="inner-square-div">3</div>
<div class="inner-square-div">4</div>
</div>
<div>
关于html - 如果可以的话,我想让我的 flex box 进入 2 x 2 网格帮助,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52696578/
如果我 mov, eax 12345 和之后的 mov var, eax (假设 var 是一个 32 位的 int 等..等等)并输出 var 稍后它会正确输出。 与 ax 相同。 mov ax,
我有这个代码: for($nrt=0; $nrt"; if($sidesIndexes[$nrt]==$nrt) { echo "am I in??? ".$sidesInde
我正在阅读The Go Programming Language的8.5章,并陷入一些代码。下面的代码列表。 func main() { naturals := make(chan int)
我写了一个 MySQL 查询用于将数据导出到文本文件。 查询运行成功,但结果与我的预期不符。 我想在列之间没有间距的结果。 select sample_export_record1_2013.
在普通的 Excel 窗口中,我可以打开 VBE 并通过触摸键序列插入一个新模块:ALT+F11、ALTim 全部不使用鼠标。有没有办法打开 VBE 并导航到 本工作手册 不使用鼠标的代码区域? 最佳
我正在使用 axios 发出 http 请求。在 .then() 内部,我正在使用另一个 axios 调用。最后,我有第三个 then(),它应该在第二个 then 之后运行,但实际上并没有这样做。
我需要在 cocos2d 项目中播放视频..我的问题是:如何将 MPMoviePlayerController 放入我的 View 中,如下所示:? UIView *theView = [[CCDir
我正在学习 Angular。以下代码有效: .controller('abc', function ($scope, $http) { $http.get("/Handlers/Authenticat
目前我正在使用 WPF 学习 C#。我的主要方法是尽我所能使用 MVVM 模式,但现在我有点困惑。 在我所有 View 的应用程序中,我有一个 View 模型: private DruckviewVi
关于将 G 邮件提取到 Google 电子表格,我该如何添加 IF 以按主题驳回特定电子邮件?例如:电子邮件回复(主题中带有“RE:”)。我不希望这些电子邮件出现在我的电子表格中。 我尝试过使用 LO
我正在尝试使用 Spotify API 并进入数组。 const App = () => { const [isLoading, setIsLoading] = useState(true);
我有一个 html 模板,并且有一个条件为 --> 的代码 --> window.jQuery || document.write(""+"");
我正在开发一个 Android 应用程序,该应用程序会暴力破解从 int 创建的 MD5 和。 暴力破解部分工作正常。 (我可以sysout最终值并且它是正确的。) 我在将输出值发送到警报对话框时遇到
我正在创建一个界面,用户可以通过该界面生成多系列折线图,并控制绘制哪些数据集。 要绘制哪些数据集由复选框控制。页面加载时,默认数据集以图表形式呈现,并且 $('input:checkbox.data-
我尝试将有向无环图绘制为力布局。 但是我注意到,尽管为每个组元素灌输了进入/退出条件,弹出的节点/链接并没有从 DOM 中删除它们自己。 相反,弹出的节点/链接在力布局中卡住;这意味着没有调用进入/退
这里是新手。我不知道它是怎么发生的,但我正在处理一个程序,当我去调试并进入时,黄色箭头走到了我代码的最后并跳过了整个 block 。有快速解决方法吗? 最佳答案 按 F11,或单击工具栏上的“Step
我的 Action 栏 sherlock 中有一个列表。我想在用户点击该列表时得到。我不想知道用户何时点击某个项目,我已经知道 (onNavigationItemSelected)。 在我的 onCr
** 你好 **我如何从 ci 中的 mysql 日期获取 eurodate 来工作......无法弄清楚 - 请帮忙 想要获取日期 YY-mm- dd -> dd-mm-yy提前致谢 最佳答案 $t
我有以下脚本: #!/bin/bash ls -1 | while read d do [[ -f "$d" ]] && continue echo $d cd $d done
TL;DR - 跳转到最后一段 背景 我正在执行一些数据驱动测试,并将日志文件用作测试输出之一。它的工作原理是这样的- 读取文件夹中的第一个文件 处理第一行并转换为测试 运行测试 执行验证 1 ...
我是一名优秀的程序员,十分优秀!