css中把标点去掉的代码

admin 轻心小站 关注 LV.19 运营
发表于前端技术学习版块 css,教程

在CSS中,我们可以使用一些技巧把一些标点去掉,使样式更加美观。以下是我收集到的一些CSS代码,可以帮助你去掉标点。/* 去掉所有标点 */ p { text-rendering: optimizeL

在CSS中,我们可以使用一些技巧把一些标点去掉,使样式更加美观。以下是我收集到的一些CSS代码,可以帮助你去掉标点。

/*  去掉所有标点  */
p {
  text-rendering: optimizeLegibility;
  text-decoration-skip-ink: none;
  text-decoration: none;
  text-indent: 0;
  text-align: left;
  text-transform: none;
  word-wrap: normal;
  white-space: normal;
  letter-spacing: normal;
  font-weight: normal;
  font-size: 1em;
  font-variant: normal;
  font-style: normal;
  color: #000;
  background-color: transparent;
  border: 0;
  outline: 0;
  margin: 0;
  padding: 0
}

/* 去掉逗号 */
p::before {
  content: "";
}

p::after {
  content: "";
}

/* 去掉句号 */
p::after {
  content: "";
}

/* 去掉感叹号 */
p::after {
  content: "";
}

/* 去掉问号 */
p::after {
  content: "";
}

/* 去掉分号 */
p::before,
p::after {
  content: "";
} 

以上代码可以帮助你去掉常见的标点符号。如果你需要去掉其他标点,可以根据需要进行自定义修改。希望以上代码能够帮助到你。

文章说明:

本文原创发布于探乎站长论坛,未经许可,禁止转载。

题图来自Unsplash,基于CC0协议

该文观点仅代表作者本人,探乎站长论坛平台仅提供信息存储空间服务。

评论列表 评论
发布评论

评论: css中把标点去掉的代码

粉丝

0

关注

0

收藏

0

已有0次打赏