CSS样式

1、禁止选中文本

body {

      -webkit-touch-callout: none; /* iOS Safari */

      -webkit-user-select: none; /* Chrome/Safari/Opera */

      -khtml-user-select: none; /* Konqueror */

      -moz-user-select: none; /* Firefox */

      -ms-user-select: none; /* Internet Explorer/Edge */

      user-select: none; /* Non-prefixed version, currently

      not supported by any browser */

}

2、超出文字以"..."结尾

p{
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

你可能感兴趣的:(CSS样式)