• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

web实训第二天——骰子布局与小程序开发

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

建立touzi.html与touzi.css

.html代码

<!DOCTYPE html>
<html>
<head>
<style> 
div{ float:left} 
</style>
    <title>骰子布局</title>

        <link rel="stylesheet" type="text/css" href="touzi.css">   
</head>
<body bgcolor="#2b2b2b"  >
<div class="a-a box1" >
  <span class="item"></span>
</div>
   <div class="a-a box2">
    <span class="item"></span>
    <span class="item"></span>
  </div>
</div>
   <div class="a-a box3">
    <span class="item"></span>
    <span class="item"></span>
    <span class="item"></span>
  </div>
<div class="a-a box4">
  <div class="column">
    <span class="item"></span>
    <span class="item"></span>
  </div>
  <div class="column">
    <span class="item"></span>
    <span class="item"></span>
  </div>
</div>
  <div class="a-a box5">
    <div class="column">
      <span class="item"></span>
      <span class="item"></span>
    </div>
    <div class="column">
      <span class="item"></span>
    </div>
    <div class="column">
      <span class="item"></span>
      <span class="item"></span>
    </div>
  </div>
<div class="a-a box6">
  <div class="column">
    <span class="item"></span>
    <span class="item"></span>
    <span class="item"></span>
  </div>
  <div class="column">
    <span class="item"></span>
     <span class="item"></span>
     <span class="item"></span>
  </div>
</div>
  <div class="a-a box7">
    <div class="column">
      <span class="item"></span>
      <span class="item"></span>
      <span class="item"></span>
    </div>
    <div class="column">
      <span class="item"></span>
    </div>
    <div class="column">
      <span class="item"></span>
      <span class="item"></span>
      <span class="item"></span>
    </div>
  </div>
</body>
</html>

 

.css代码


.item {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #333;
  margin: 4px;
  box-shadow: inset 0 3px #111,inset 0 -3px #555;
}

.a-a{
  width: 104px;
  height: 104px;
  margin: 16px;
  padding: 4px;
  background-color: #e7e7e7;
  border-radius: 10%;
  object-fit: contain;
  box-shadow:
    inset 0 5px white, 
    inset 0 -5px #bbb,
    inset 5px 0 #d7d7d7, 
    inset -5px 0 #d7d7d7;
}
.box1 {
  display: flex;
  justify-content: center;
  align-items: center;
}
.box2 {
  display: flex;
  justify-content: space-between;
}

.box2 .item:nth-child(2) {
  align-self: flex-end;
}
.box3 {
  display: flex;
}

.box3 .item:nth-child(2) {
  align-self: center;
}

.box3 .item:nth-child(3) {
  align-self: flex-end;
}
.box4{
  display: flex;
  justify-content: space-between;
}
.box4 .column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.box5 {
  display: flex;
}
.box5 .column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.box5 .column:nth-child(2) {
  align-self: center;
}
.box6 {
  display: flex;
  justify-content: space-between;
}
.box6 .column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.box7 {
  display: flex;
  justify-content: space-between;
}

.box7 .column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.box7 .column:nth-child(2) {
  align-self: center;
}
 

 

小程序

app.json

{

"pages": [

"pages/index/index",

"pages/logs/logs",

"pages/aa/aa",

"pages/taibai/taibai",

"pages/mine/mine"

],

"window": {

"backgroundTextStyle": "light",

"navigationBarBackgroundColor": "#ddd",

"navigationBarTitleText": "一剑天涯",

"navigationBarTextStyle": "white",

"enablePullDownRefresh": true,

"backgroundColor": "#000000"

},

"tabBar": {

"color": "#000000",

"selectedColor": "#6A5ACD",

"list": [

{

"pagePath": "pages/index/index",

"text": "首页",

"iconPath": "image/timg2.png",

"selectedIconPath": "image/timg.jpg"

},

{

"pagePath": "pages/aa/aa",

"text": "分类",

"iconPath": "image/aa.jpg",

"selectedIconPath": "image/aa2.jpg"

},

{

"pagePath": "pages/aa/aa",

"text": "购物车",

"iconPath": "image/buy1.png",

"selectedIconPath": "image/buy.jpg"

},

{

"pagePath": "pages/mine/mine",

"text": "我的",

"iconPath": "image/my1.jpg",

"selectedIconPath": "image/my2.png"

}

]

},

"sitemapLocation": "sitemap.json"

}

新建image文件夹,放入图片

 

在pages内建立相关文件夹


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
ActiveMq队列数据监控器----1小时1个Swing小程序发布时间:2022-07-18
下一篇:
微信小程序——工程构建(vscode)发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap