微信小程序-Flex入门实战

版权声明:摇亿.黄菊华 https://blog.csdn.net/u013818205/article/details/86175960

网页代码

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Flex Box简单表单</title>
<style> 
.flex-container { 
    display: -webkit-flex; 
    display: flex; 
    width: 400px; 
    height: 250px; 
    background-color: lightgrey; 
} 
.flex-item{ 
    background-color: cornflowerblue; 
    width: 100px; 
    height: 100px; 
   margin: 10px; 
} 
</style> 
</head>
<body>
<div class="flex-container"> 
  <div class="flex-item">flex item 1</div> 
  <div class="flex-item">flex item 2</div> 
  <div class="flex-item">flex item 3</div> 
</div> 
</body>
</html>

效果如图
在这里插入图片描述

欢迎大家收看我的视频教程:微信小程序界面设计布局Flex Box精通课程 (微信小程序界面设计必备技能)

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/u013818205/article/details/86175960