taro css 转换 bug

https://nervjs.github.io/taro/docs/size.html

https://nervjs.github.io/taro/docs/component-style.html

Taro.pxTransform

css in js

https://nervjs.github.io/taro/docs/size.html#api

最佳实践

  1. 使用 css 的 class 设置样式

  2. 为每个组件分别指定 box-sizing 属性

  3. 使用正确的包裹容器,View

...

h5 to taro

  1. span === Text
  2. div === View

box-sizing: border-box;

no span, no *

以下全局公用样式不会生效

@charset "UTF-8";

*{
margin: 0;
padding: 0;
box-sizing: border-box;
} span, div{
margin: 0;
padding: 0;
box-sizing: border-box;
}





demos

  1. box-sizing: border-box;

  1. /*! autoprefixer: ignore next */

多行文本省略号 ...

.ticket-card-info{
width: 242px;
height: 32px;
line-height: 16px;
font-size: 11px;
font-family:PingFang-SC-Regular,PingFang-SC;
font-weight:400;
color:#999999;
display: block;
margin-top: 8px;
overflow: hidden;
/* white-space: nowrap; */
// 需要加上这一句autoprefixer的忽略规则 否则这一行样式加不上 导致无法展示省略号
/*! autoprefixer: ignore next */
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
/*! autoprefixer: ignore next */
-webkit-box-orient: vertical;
white-space: normal;
}


taro css 转换 bug的更多相关文章

  1. taro 小程序 & touch event 转换 bug

    taro 小程序 & touch event 转换 bug before after 事件处理 https://nervjs.github.io/taro/docs/event.html#do ...

  2. IE6的那些css常见bug(汇总)

    IE6的那些css常见bug(汇总) 我的微博终于在前几天建立了 虽说很早之前就知道博客园这个地方 但怕自己不能坚持去写一些东西一直没有建.这几天 我做了这个决定 把我的博客建起来 每周发一些看到的, ...

  3. 2017春 前端自动化(二) 页面自动刷新、sass与css转换的使用、pxToRem直观转换

    2017春 前端自动化(二)   页面自动刷新.sass与css转换的使用.pxToRem直观转换 引言:   此文要演示:浏览器页面自动刷新:移动端px与rem的转换,简单直观化:使用sass自动生 ...

  4. 前端零基础 --css转换--skew斜切变形 transfor 3d

    前端零基础 --css转换--skew斜切变形 transfor 3d==============重要不紧急! 重要紧急 重要不紧急 不重要紧急 不重要不紧急

  5. IE6中CSS常见BUG全集及解决方案——摘自网友

    IE6中CSS常见BUG全集及解决方案 IE6双倍边距bug 当页面内有多个连续浮动时,如本页的图标列表是采用左浮动,此时设置li的左侧margin值时,在最左侧呈现双倍情况.如外边距设置为10px, ...

  6. CSS :nth-of-type() bug

    CSS :nth-of-type() bug .tools-hover-box-list-item { pointer-events: auto; box-sizing: border-box; di ...

  7. taro list render bug

    taro list render bug 列表渲染 https://taro-docs.jd.com/taro/docs/list.html not support jsx map 垃圾微信 cons ...

  8. IE常见的CSS的BUG(一)

    2011年6月,我毕业了.2012年我接触了CSS,本以为会好过些能赚点钱了,可谁知,Internet Explorer(下称IE),这个前端工程师的噩梦浏览器让我不再那么好过了.各种出现在IE身上的 ...

  9. taro CSS Modules 的使用

    Taro 中内置了 CSS Modules 的支持,但默认是关闭的,如果需要开启使用,请先在编译配置中添加如下配置. 小程序端开启 weapp: { module: { postcss: { // c ...

随机推荐

  1. python模块----configpaser (key:value型 配置文件解析器)

    configparser是用来读取配置文件的包,配置文件的格式类似:[section]+内容(键=值) 标准库网址:https://docs.python.org/3/library/configpa ...

  2. K8s client 使用

    使用的k8s client包: <dependency> <groupId>io.fabric8</groupId> <artifactId>kuber ...

  3. Pytest(3)fixture的使用

    fixture的优势 Pytest的fixture相对于传统的xUnit的setup/teardown函数做了显著的改进: 命名方式灵活,不局限于 setup 和teardown 这几个命名 conf ...

  4. Azure Functions(一)什么是 ServerLess

    一,引言 自去年4月份分享过3篇关于 Azure Functions 的文章之后,就一直没有再将 Azure Functions 相关的内容了.今天再次开始将 Azure Functions 相关的课 ...

  5. hdu 6268 Master of Subgraph(点分治+bitset)

    You are given a tree with n nodes. The weight of the i-th node is wi. Given a positive integer m, no ...

  6. KMP浅谈

    关于KMP ​ KMP其实是三个人名字的缩写,因为是他们同时发现的(大佬惹不起); ​ KMP作为CSP考点,主要亮点是其优秀的匹配复杂度,而且消耗空间小,比起hash虽然有些局限性,但是因为其正确率 ...

  7. P3980 [NOI2008]志愿者招募 (费用流)

    题意:最多1000天 每天需要至少ai个工人施工 有10000种工人可以雇佣 每种工人可以工作si到ti天 雇佣一个的花费是ci 问怎样安排使得施工花费最少 思考:最直白的建模方式 就是每种工人可以和 ...

  8. 【noi 2.7_2987】小兔子捡金币(算法效率)

    题意:问蛇形回文的访问次序. 解法:很基础的一道题,先算出询问的点处在第几环,再用4个while一个个走一遍这一圈.P.S.我一直想办法想用不用while(),可是真的一直WA!所以用while()既 ...

  9. codeforces 580D. Kefa and Dishes

    time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...

  10. Codeforces Gym-102219 2019 ICPC Malaysia National J. Kitchen Plates (暴力,拓扑排序)

    题意:给你5个\(A,B,C,D,E\)大小关系式,升序输出它们,如果所给的大小矛盾,输出\(impossible\). 题意:当时第一眼想到的就是连边然后排序,很明显是拓扑排序(然而我不会qwq,之 ...