[英]How can I make button go right, fix middle section and make everything resizible
I have a 3 sections in my html我的 html 中有 3 个部分
How can I make everything resizible and have seconds section fixed so it doesn't resize (label and below 2 buttons) and have 3 button Road go on the right and doesn't move, it should be fixed.我怎样才能让所有东西都可以调整大小并固定秒部分,这样它就不会调整大小(标签和下面的 2 个按钮)并且有 3 个按钮 Road 在右边并且不会移动,它应该被修复。
So in the nutshell, textarea should be resizible and seconds section and button the right should be fixed.所以简而言之,textarea 应该是可调整大小的,并且秒部分和按钮应该是固定的。
<html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title></title> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> </head> <body> <div id="main_section" class="container"> <div class="cstm-item d-flex"> <div class=""> <textarea name=""></textarea> </div> <div class="h-100 text-center"> <span>LEFT RIGHT</span> <div> <button><i class="fa fa-minus"></i></button> <button><i class="fa fa-plus"></i></button> </div> </div> </div> <div> <button><i class="fa fa-road"></i></button> </div> </div> </body> </html>
This solution would work.这个解决方案会起作用。 Let me know if there is anything wrong in UI alignment.
如果 UI 对齐有什么问题,请告诉我。
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<style>
.solution {
display: flex;
align-items: center;
}
.solution > div {
padding: 0 10px;
}
.solution > div:first-of-type {
flex-grow: 1;
}
textarea {
width: 100%;
}
</style>
<body>
<div id="main_section" class="container">
<div class="solution">
<div>
<textarea class="item-text-area" name=""></textarea>
</div>
<div>
<span>LEFT RIGHT</span>
<div>
<button><i class="fa fa-minus"></i></button>
<button><i class="fa fa-plus"></i></button>
</div>
</div>
<div>
<button><i class="fa fa-road"></i></button>
</div>
</div>
</div>
</body>
</html>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.