什么是{block:Hidden}?何时使用? [英] What is the {block:Hidden} and when is it used?

查看:134
本文介绍了什么是{block:Hidden}?何时使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

    {block:Hidden}
    <meta name="if:Sliding header" content="1">    
    <meta name="if:Collapse navigation" content="1">
    <meta name="if:Endless scrolling" content="1">

    <meta name="select:Layout" content="regular" title="Regular">
    <meta name="select:Layout" content="narrow" title="Narrow">
    <meta name="select:Layout" content="grid" title="Grid">

    <meta name="text:Disqus shortname" content="">
    <meta name="text:Google analytics ID" content="">
    {/block:Hidden}

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">

这似乎是一个显而易见的问题,但是我是一位刚开始尝试自己学习网页设计的网页设计师.我知道这些块"是Tumblr特有的,但不知道为什么这里需要{block:Hidden}.我当时以为这些元if和名称已经被隐藏了.为什么在隐藏块中{/block:Hidden}之后的两行没有显示?

This may seem like an obvious question, but I'm a beginning web designer that is trying to learn web design on my own. I know that these "blocks" are Tumblr specific, but don't know why {block:Hidden} is needed here. I was under the assumption that these meta ifs and names would already be hidden. And why aren't the two lines after {/block:Hidden} in the Hidden block?

推荐答案

元标记不会像<head>中的所有其他标记一样被浏览器呈现.它们在那里但对用户不可见".有些是由浏览器读取的,有些是由搜索引擎读取的,在这种情况下,有些是由Tumblr读取的.

Meta tags are not rendered by the browser, like every other tag in <head>. They are there but "invisible" to the user. Some are read by the browser, some are read by search engines and in this case some are read by Tumblr.

由于Tumblr本身通常不需要Tumblr的meta标签(或主题选项),因此可以使用{block:Hidden}阻止它们出现在生成的HTML中,从而节省带宽.

Since Tumblr's meta tags (or theme options) are usually not needed outside Tumblr itself, you can use {block:Hidden} to prevent them from appearing in the generated HTML, thus saving bandwidth.

{block:Hidden}不在文档中,因为它不存在.因此,Tumblr从不显示其内容. {block:NOPE}或任何其他不存在的块将以相同的方式工作.

{block:Hidden} is not in the docs because it does not exist. For that reason, Tumblr never shows its content. {block:NOPE} or any other non-existent block would work the same way.

该块之外的meta标签与Tumblr不相关;它们需要出现在生成的代码中,然后才能发送到浏览器.如果您想进一步了解有关视口元标记.

The meta tags outside that block are not Tumblr-related; They need to appear in the generated code and thus to be sent to the browser. Here's an article if you want to know more about the viewport meta tag.

这篇关于什么是{block:Hidden}?何时使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆