css - css 注释中的 "/* =SomeText"是什么

标签 css wordpress

Wordpress 样式表注释在注释名称前有“/*=”。为什么它不只是/*,为​​什么它后面有“=”?是否有助于轻松找到评论,还是一无所获?

最佳答案

尽管我强烈建议不要使用 w3schools.com,但他们很好地解释了这个问题:

CSS 注释

注释用于解释您的代码,并可能在您以后编辑源代码时对您有所帮助。浏览器会忽略评论。

CSS 注释以“/*”开头,以“*/”结尾,如下所示:

/*This is a comment*/
p
{
text-align:center;
/*This is another comment*/
color:black;
font-family:arial;
}

Source

关于=,它可能用于指定注释中的一个点,用于稍后替换或格式化。

更新 1

找到 this关于 = 符号。

Adding a marker to a comment block makes it more searchable. This is called flagged comment block. For example:

/*= Header
 * - description -
 */

In this case, the flag used is the equal sign (=). By using it as a search string in your editor, you can actually navigate through all your sections of your CSS file.

However, a simple marker like an equal sign may be inappropriate when you want to be more specific. In this case, you can add an identifier to the flag:

/*=head Header
 * - description -
 */

Now you can search for =head in your editor. This is called a labeled flagged comment block.

关于css - css 注释中的 "/* =SomeText"是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12188442/

相关文章:

html - 转换的垂直居中无法按预期工作

html - 页面不会扩展到全高 - 页脚下方显示细黑线

PHP 解析错误 : syntax error, 意外 '!' 在

php - 如何使用wordpress wpdb类插入数据

css - 为什么我的 css 网格没有包含它的子元素?

html - 表格单元格内的 <td> 标记在 IE 7 中创建换行符

javascript - css 背景颜色不显示

javascript - 将多部分表单(输入类型=文件)转换为WordPress媒体库上传

php - WordPress 自定义短代码破坏了保存过程(post.php)

php - 使用 $wpdb 表示法允许搜索并可能回显某些类别的帖子的查询是什么?