微信小程序笔记(三)

一个简单的开始页面

3-2 官方种子项目介绍与小程序的文件结构

1.以ihhone6,750px的像素设计最佳;750x1334;

2.设置style的两种方式:动态样式写在style里,静态写在class样式表里。

  (1)在wxml文件中设置

 

1 <image style="width:200rpx;height:200rpx" src="/images/2013516191254219.jpg"></image>

 

  (2)在xcss文件中设置

.user-avatar{
    width:200rpx;
    height:200rpx;
    margin-top: 100rpx;
}
1 <!--wxml是编写小程序骨架-->
2 <!--<div>-->
3 <view>
4     <image class="user-adatar" src="/images/2013516191254219.jpg"></image> 
5     <text>hello</text>
6     <view>
7         <text>开启小程序之旅</text>  
8     </view>
9 </view>

 


 

posted @ 2016-12-30 18:01  BugsTerminator  阅读(286)  评论(0编辑  收藏  举报