Css 仅在一页上隐藏元素

Css 仅在一页上隐藏元素,css,Css,body.943.ish按钮小{显示:无;} 我想隐藏id为943的页面上的class“.ish button small”。 只记住那一页。做这件事的最佳方法是什么?不能只使用CSS,这应该与Javascript配合使用 #943 .ish-button-small {display:none;} $(document).ready(function () { if (window.location.href.indexOf("943") != -1) { $("#.ish-bu

body.943.ish按钮小{显示:无;}

我想隐藏id为943的页面上的class“.ish button small”。
只记住那一页。做这件事的最佳方法是什么?

不能只使用CSS,这应该与Javascript配合使用

#943 .ish-button-small {display:none;}
$(document).ready(function () {
  if (window.location.href.indexOf("943") != -1) {
    $("#.ish-button-small").hide();
  }
});
检查URL是否包含943,如果包含943,则使用class.ish按钮隐藏元素。请尝试以下操作:

body#943 .ish-button-small {display:none;}

nvm,误读了你的要求。那么应该是
body#943。ish按钮很小
是某个元素或查询字符串参数的
943
id属性吗?