写静态页面遇到的问题

写静态页面遇到的问题

  • 用bootstrap写的轮播图,在移动端需要停止自动轮播
var screenwidth = $(window).width()
    if (screenwidth > 767) {
          $("#myCarousel").carousel()
      }else{
          $("#myCarousel").carousel('pause')
          $('#myCarousel').removeAttr('data-ride')
}
  • 移动端触摸相当于PC端的hover
//  passive: true  解决下图的报错,被动事件
on('touchstart' ,function () {} ,{passive: true})

写静态页面遇到的问题_第1张图片

  • 文字自动换行:word-break: word
  • 超过长度文字出现三点:text-overflow: ellipsis; white-space: nowrap;
  • 缩进: text-indent: 1.5em;

你可能感兴趣的:(html)