1)使用flex布局,父容器设置display:flex,左边div设置flex:0 0 100px width:100px height:100px;右边div设置:flex:1 height:100px
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.container{
background:red;
display: flex;
-webkit-display:flex;
}
.d1{
background:rgba(2,55,66,0.5);
flex: 0 0 100px;
width:100px;
height:100px;