Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
最近,我在我的项目中看到越来越多的“小”问题......我正在处理一个CSS带有一些classes. 我看到很多对基类的重写,例如:
CSS
classes
input { //code }
当我想使用它的时候,我当然会使用那些重写的设置。使用基类的原始设置并忽略这些更改的最佳方法是什么。例如使用原始设置input。
input
如果有帮助,我每个页面都有一个 ID。
您可以编辑您的 css并将类用于您input想要使用原始 css 的所有输入。input:not(.original)original
input:not(.original)
original
例子
css
input:not(.original){ /*your css*/ }
html
/* affected by the css*/ <input> /* not affected by the css*/ <input class=original>
这是一个例子
或者您也可以更改inputto.input并将类添加input到您要使用自定义 css 的所有输入中。
.input
我需要更新一个正在移动到新主机的网站。我想在每个文件中添加以下行,只有一次,在第一次出现之后<?php:
<?php
define('FRAMEWORK_LOCATION', '/home/someUser/framework.php');
我已经尝试了这个 Perl oneliner 的几种变体: