首页 \ 问答 \ 为什么开源项目通常没有文件扩展名的文档文件?(Why do open-source projects often have documentation files with no file extension? [closed])

为什么开源项目通常没有文件扩展名的文档文件?(Why do open-source projects often have documentation files with no file extension? [closed])

开源项目通常附带自述文件,包含许可证文本的文件,以及其他各种内容。 通常,人们发现这些各种文档文件的命名没有文件扩展名。 以下是Github的一个例子。 名称通常是大写字母,如“README”而不是“readme.txt”。

这有点麻烦,因为如果您下载项目的副本,为了打开这些文件,您必须添加文件扩展名或每次,指示操作系统应该打开哪个程序。为什么会这样做有人宁愿不添加文件扩展名吗? 这个恼人的惯例来自哪里?


Open-source projects generally come with a readme file, a file containing the text of the license, and maybe various other things. Often, one finds that these sundry documentation files are named without file extensions. Here is an example from Github. Often the names will be in capitals, as in "README" rather than "readme.txt".

This is a bit of a bother, because if you download a copy of the project, in order to open these files you have to add a file extension or each time, instruct the operating system on which program it should be opened in. Why would someone ever prefer not to add a file extension? Where does this irritating convention come from?


原文:https://stackoverflow.com/questions/15582713
更新时间:2022-04-09 14:04

最满意答案

12px是字体大小, 18px是行高。

语法基于用于指定各自大小的排字符号,并且仅适用于font简写属性。 换句话说,上述声明简单地扩展到以下内容:

font-size: 12px;
line-height: 18px;

一如以往,如果将线高度设置为相对值(例如百分比或ems),则相对于字体大小计算。

W3C CSS2.1 font属性参考
W3C CSS3字体模块font属性引用 (语法从CSS2.1转载)


12px is the font size, 18px is the line height.

The syntax is based on typographical notation for specifying the respective sizes, and is only applicable to the font shorthand property. In other words, the above declaration simply expands to the following:

font-size: 12px;
line-height: 18px;

As always, if you set the line height to a relative value (e.g. percentage or ems), it's calculated relative to the font size.

W3C CSS2.1 font property reference
W3C CSS3 Fonts Module font property reference (the syntax carries over from CSS2.1)

相关问答

更多
  • 12px是字体大小, 18px是行高。 语法基于用于指定各自大小的排字符号,并且仅适用于font简写属性。 换句话说,上述声明简单地扩展到以下内容: font-size: 12px; line-height: 18px; 一如以往,如果将线高度设置为相对值(例如百分比或ems),则相对于字体大小计算。 W3C CSS2.1 font属性参考 W3C CSS3字体模块font属性引用 (语法从CSS2.1转载) 12px is the font size, 18px is the line height. ...
  • 这实际上设置了两个属性,相当于: font-size: 100%; line-height: 120%; 引用官方文件 : 该属性的语法基于传统的印刷速记符号来设置与字体相关的多个属性。 正如David M在评论中所说,它反映了将字体大小指定为“ x pt on y pt”的排版传统,以表示行高上的字形大小。 但是,您的问题中的示例实际上是错误的,并且将被浏览器忽略:您只能以font简写符号组合这两个属性,您必须至少指定字体大小和系列。 简单地写font: 100%/120%; 因此是不够的 您可以添加通 ...
  • 多种字体表示要使用的字体的首选顺序。 在这种情况下, Georgia是首选字体; 如果没有,请使用Times New Roman ,最后回到Sans-Serif 。 em是字体大小的相对度量 ,所以在这种情况下,它意味着使用“正常”字体大小的一半。 Multiple fonts indicate an order of preference in fonts to use. In this case, Georgia is the preferred font; if that's not availabl ...
  • 实际上, black是使CSS系无效的原因。 font: 12px "Open Sans"; 应该完美运行(当我尝试使用Chrome时)。 如果您正在尝试设置字体颜色,请使用以下color: black; 属性。 Actually, the black is what makes that line of CSS invalid. font: 12px "Open Sans"; should work perfectly (and does when I try on Chrome). If you're ...
  • Slim不支持类名称中的正斜杠。 我认为这是唯一的方法: div class="w-1/3" Slim doesn't support forward slashes in class names. I think there is the only one way for it: div class="w-1/3"
  • 这是一个应该完成这项工作的功能。 问题在于font-style,font-variant和font-weight属性以及值“normal”,你可以在css规范中阅读( [[ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | s ...
  • 以及如果我理解相同的问题,那么我刚刚在提到的浏览器上测试它,它工作得很好。 我没有看到任何问题。 或者如果您可以借助屏幕截图详细说明您的问题,它可能会帮助我们正确回答您的问题。 以下片段可能会有所帮助。 div.withCss{ font-family: arial; font-size: 20px; }
    Thing One / Thing Two / Thing Three
  • “反斜杠零”是针对当前规则的针对IE8的css hack。 这可能是一件可怕的事情,除非没有其他选择。 会发生什么情况是IE8会错误地认为这是一个有效的规则,而其他浏览器不会应用,留下一个混乱规则: .my-dirty-rule-for-ie-8-only { margin-bottom: 5px\0; } 对于此规则集,这意味着仅当用户使用IE8显示您的页面时,第二个填充才会通过覆盖第一个填充来生效。 从开发人员的角度来看,应该不惜一切代价避免使用css hacks。 你真的不想处理针对特定浏览器的规则 ...
  • 该语法只是用于指定font-size和line-height简写。 如果您手动声明规则,它的外观如下: .typed { font-size: 4em; line-height: 50px; } That syntax is just short-hand for specifying the font-size and line-height. Here's how it would look if you declared the rules manually: .typed { ...
  • 在规则h1 { font: 3em 'Display' } , 'Display'部分指定字体系列名称。 这使得规则在语法上有效,而如果省略,则规则在语法上无效并完全被忽略。 这里系统是否实际上有一个名为Display的字体系列并不重要。 它可能没有,然后浏览器使用一些后备字体,通常是它的默认字体。 通过font简写的定义,此规则将所有字体属性设置为其初始值,除非在规则中为它们提供了值。 因此, font-size设置为3em , font-family为Display ,所有其他字体属性设置为CSS规范中 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)