uniapp problem

133 阅读1分钟

uniapp导入自定义字体 uniapp定义全局字体

解决方法:

把字体上传传到后端服务器上  返回的地址就放再字体的 src上就行

uni-app有哪些ui框架/css框架可用?

  • Vant Weapp
vant是分web版和weapp版的,千万别搞混
vant的web版操作了dom,所以只能用于web端;而vant weapp是微信小程序组件规范,可以用于微信、App、H5;vant自身并没有提供全端可用的无dom vue组件。
  • uView (饿了么的)
  • colorUI

单位rpx和upx有啥区别?

justify-content :center

margin-top

margin : 0 auto ;写在上面

margin-bottom不生效

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
</head>

<body>
    <div style="width:300px; height:100px; background-color:red; margin-bottom: 30px; margin-top: 30px;">
        上部层margin-bottom: 30px; 不生效</div>
    <div style=" width:300px; height:300px;overflow:hidden;background-color: green; margin-top: 30px;">
        <!--父层-->
        <div style=" width:200px; height:200px;background-color: orange;  margin-top: 30px;">子层</div>
    </div>
    <div style="width:100px; height:200px;background-color: orange;  margin-top: 30px;">

    </div>
</body>

</html>

它生效的是根据什么来的呢?

比如一个盒子外层要加border-raduis 里面的view也要加上才生效

/* bug border 要父子都得加 */

渐变色

background-image: linear-gradient(to top left,#CD853F , #CD69C9);/* 自右下向左上渐变 */

uview 选择框

index 与 id 重复?

radio

checkbox

slot v-slot

v-slot 只能添加在 template 上 ,绑定在其他元素上用slot="**"

微信小程序 uniapp 用对象传值失效