css - 对除特定 ID 之外的所有按钮应用 CSS
问题描述
我有一个代码:
button {
background: rgb(1, 81, 227);
background: linear-gradient(
90deg,
rgba(1, 81, 227, 1) 35%,
rgba(0, 90, 255, 1) 100%
);
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 20px;
margin: 4px 2px;
cursor: pointer;
border-radius: 6px;
}
还有一大堆按钮。我想为除两个按钮之外的所有按钮应用该 css 代码,ID 为 startAction 和 endAction。
我怎么做?
解决方案
button:not(#startAction):not(#endAction)
通过@underscore_d
推荐阅读
- python - Python:3D列主要张量到行主要
- c - 执行条件为假后,for循环仍然递增
- mysql - json解析错误无法识别的令牌'<'在sql中散列时反应本机
- ios - DispatchGroup 只会在方法被调用两次时退出
- numpy - 使用 iniria 数据集进行 HOG +SVM 训练,TypeError:样本不是 numpy 数组,也不是标量
- jquery - 屏幕分辨率比实际小两倍
- r - 使用 sf、ggplot 和 cut_interval() 的 Choropleth 中的组数错误
- python - 如何使用unix套接字将url参数传递给Nginx proxy_pass后面的Flask
- assembly - 在汇编 13h 模式下“读取”图形屏幕
- php - 在函数中调用另一个函数 - 定位输出