【小程序】微信小程序开发技巧实用手册(自己做笔记用)

【Css】Css和Html常用设计实例参考笔记(自己开发项目用)_敦厚的曹操的博客-CSDN博客_html和css的项目实例一、左右居中1、div等块元素左右居中margin: 0 auto;margin: 0 auto;2、span等行级元素左右居中text-align: center;text-align: center;二、图片、图标字体等上下错位调整相对定位:position:relative{ position:relative; left:10px; top:10px}三、图标字体等上下错位调整.........https://blog.csdn.net/dxnn520/article/details/124026765一、与h5转换,替换元素

【小程序】把微信小程序转换h5代码的几个关键字替换_敦厚的曹操的博客-CSDN博客_微信代码转换一、文件名和内容更换1、把.wxml扩展名改成.html2、把wxss扩展名改成.css3、增加body等长用项。4、增加.css文件的链接<link rel="stylesheet" href="css/index.css">二、css文件中替换1、page{} 替换成 body{}2、image 替换成 img3、text 替换成 span4、view 替换成 div三、html文件中替换1、<text> 替换成 <span&https://blog.csdn.net/dxnn520/article/details/122784155

二、navigator超链接和路由跳转

【小程序】微信小程序中的navigator超链接和路由跳转(图文+代码)_敦厚的曹操的博客-CSDN博客_微信小程序navigator跳转【小程序】微信小程序中的navigator链接和路由跳转(图文+代码)https://blog.csdn.net/dxnn520/article/details/125366654

三、字间距和增加空格

letter-spacing:5rpx

<view>
  <text space="ensp">我是   张飞(一空格是英文大小,半个汉字)</text>
</view>
<view>
  <text space="emsp">我是    刘备(一个空格是一个汉字大小)</text>
</view>
<view>
  <text space="nbsp">我是  诸葛亮  你是关羽(跟html一样)</text>
</view>

四、requestJSON传递数据

【小程序】通过request实现小程序与后台asp.net的数据json传输(Post协议 图文+代码)_敦厚的曹操的博客-CSDN博客_asp.net json post【小程序】通过request实现小程序与后台asp.net的数据json传输(Post协议 图文+代码)https://blog.csdn.net/dxnn520/article/details/125386486

五、左右滑动菜单

【小程序】wxml中的【scroll-view】左右拖动示例(图文+完整代码)_敦厚的曹操的博客-CSDN博客_小程序左右拖动一、viewhttps://blog.csdn.net/dxnn520/article/details/122498184

六、For循环和If循环

【小程序】通过for循环实现Js数据的前台调用(商品列表示例)_敦厚的曹操的博客-CSDN博客_小程序for循环js1、 list.wxml<!--pages/index/list.wxml--><!-- <text></text> --><view class="row" wx:for="{ {listObj}}"> <view class="pic"> <image src="../images/{ {item.img}}.jpg"></image> </view> ..https://blog.csdn.net/dxnn520/article/details/122682873

【小程序】wxml中通过For循环显示js数据(图文+完整代码)_敦厚的曹操的博客-CSDN博客_小程序for循环js111https://blog.csdn.net/dxnn520/article/details/122556053

【小程序】wxml中通过if条件语句判断js数据(图文+完整代码)_敦厚的曹操的博客-CSDN博客_微信小程序js中if语句1、data.wxml<!--pages/js/data.wxml--><view>--------- if条件判断 -----------</view><view> <text space="nbsp">姓名 | </text> <text space="nbsp">性别 | </text> <text space="nbsp">成绩 | <...https://blog.csdn.net/dxnn520/article/details/122555443

七、通过setData修改Data变量和前台view的样式

【小程序】通过setData修改Data变量和前台view的样式(图文+完整示例)_敦厚的曹操的博客-CSDN博客1、even.wxml<!--pages/js/even.wxml--><view style="margin-bottom: 20px;margin-top: 20px;">-------通过setData单击view修改变量---------</view><view bindtap="click_1" data-title="单击后,我是张飞" data-id="123"style="height:{ {s_height}}px;width:{ {s..https://blog.csdn.net/dxnn520/article/details/122661560

猜你喜欢

转载自blog.csdn.net/dxnn520/article/details/125769507
今日推荐