<meta name="description" content=">作用讲解

本文深入探讨了网页元标记的使用方法与应用场景,包括如何设置网页类型与语言,优化搜索引擎抓取,实现页面自动刷新,创建特殊页面效果,标注作者信息,控制页面缓冲等。文章还提供了详细的操作步骤与实例代码,旨在帮助开发者更高效地优化网页功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、【<meta name="description" content=">】作用讲解

一、语法:
<meta name="name" content="string">
二、参数解析:
1)name项:常用的选项有Keywords(关键字) ,description(网站内容描述),author(作者),robots(机器人向导)等。
2)http-equiv项:可用于代替name项,常用的选项有Expires(期限),Pragma(cache模式),Refresh(刷新),Set-Cookie(cookie设定),Window-target(显示窗口的设定),content-Type(显示字符集的设定)等。
3)content项:根据name项或http-equiv项的定义来决定此项填写什么样的字符串。
三、应用
1、告诉浏览器网页所识别的文件类型及语言类型,比如说,我们要让浏览器识别HTM/HTML类型的简体中文网面,我们可以这样写:
< Meta http-equiv="Content-Type" content="text/html; charset=gb2312" >
2、让一些搜索引擎搜索到你的网页,代码可以这样写:
< Meta Name=" Keywords" Content="网页关键字" >
< Meta Name=" description" Content="网页描述文字" >
要达到自动搜索引擎真正能方便地搜索到你的网页还得注意以下几点:
A、既要定义meta标记项,又要将首页正文的前200个字符定义成反映主页主题的文字。因为有些导航台在标引meta项中的关键词的同时,还要标引正文中的前200个字符。如:altavista。所以,有些人在注册完导航台后去检查注册结果时,发现导航台中的描述并不是你所希望的,而是诸如版权说明之类的文字。产生这一现象的原因就是没有注意到这一点。
B、将定义关键词的meta标记项放在定义描述的meta项之前。如:
<meta type="keywords" content=".......,...,...">
<meta type="description" content="...,....,...">
C、将最重要的关键词放在最前面,让相关的关键词相邻。全小写与首字母大写并存,因为有的导航台在标引时对字符的大小写是敏感的。包括标点符号不要超过250个单词
D、首页最好不用frame结构,因为frame将屏幕划分成多个窗口后,导航台不能智能地选择正确的窗口中的主页去标引。
3、让一个页面过上一定的时间,自动转到另一个页面或者站点去,如:
< Meta HTTP-EQUIV="refresh" content="6; url=http://hi.baidu.com/tesalo/" >
content中的6表示时间,单位为秒,url=后面是你要转向的网址,若是与你当前网页在同一目录下,可以直接写上文件名,如:
< Meta HTTP-EQUIV="refresh" content="6; url=page1.htm" >
4、让网页每隔一段时间刷新一次,若要10秒刷新一次,代码这样写:
<meta http-equiv="refresh" content="10">
5、通过Meta可以让你进入页面时产生一些特殊效果,具体应用如下:
< meta http-equiv="Page-Enter" content= "revealTrans(Duration=5.0,Transition=n)" > 其中,n的取值范围为0-23,具体的意义如下:
0 矩形缩小 1 矩形扩大 2 圆形缩小
3 圆形扩大 4 下到上 5 上到下
6 左到右 7 右到左 8 竖百叶窗
9 横百叶窗 10 错位横百叶窗 11 错位竖百叶窗
12 点 13 左右到中间 14 中间到左右
15 中间到上下 16 上下到中间 17 右下到左上
18 右上到左下 19 左上到右下 20 左下到右上
21 横条 22 竖条 23 以上 24种随机选择一种

6、标注作者:
<meta name="author" content="二度空间">
7、控制页面缓冲,如不要页面缓冲的代码这样写:
<meta http-equiv="Cache-Control" CONTENT="no-cache">



转自:http://blog.sina.com.cn/s/blog_7f47d740010143be.html



<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Poetry·Music·Gaming - Personal Webpage</title> <style> /* Global styles */ :root { --primary: #1a1a2e; --secondary: #0f3460; --accent: #e94560; --text: #f1f1f1; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Lato', sans-serif; background: linear-gradient(135deg, var(--primary), #16213e); color: var(--text); line-height: 1.6; padding: 20px; } .container { max-width: 1200px; margin: 0 auto; } section { background: rgba(10, 10, 20, 0.7); border-radius: 15px; padding: 30px; margin-bottom: 30px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); backdrop-filter: blur(10px); } h1, h2 { color: var(--accent); margin-bottom: 20px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); } /* Poem section */ .poem { font-family: 'Playfair Display', serif; text-align: center; padding: 30px 0; } .poem-title { font-size: 2.5rem; margin-bottom: 10px; letter-spacing: 1px; } .poem-author { font-size: 1.2rem; opacity: 0.8; margin-bottom: 30px; font-style: italic; } .poem-content { font-size: 1.5rem; line-height: 2.2; letter-spacing: 0.5px; } .poem-line { margin: 15px 0; } /* MV player */ .player-container { position: relative; border-radius: 12px; overflow: hidden; margin: 30px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.5); } .mv-frame { width: 100%; height: 500px; border: none; } /* Game intro section */ .game-info { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 30px; } .game-text { padding: 20px; } .game-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin: 20px 0; } .feature-card { background: rgba(233, 69, 96, 0.15); padding: 15px; border-radius: 8px; border-left: 3px solid var(--accent); } .screenshot { border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.4); display: flex; align-items: center; } .screenshot img { width: 100%; height: auto; display: block; } /* Responsive design */ @media (max-width: 768px) { .game-info { grid-template-columns: 1fr; } .mv-frame { height: 300px; } .poem-content { font-size: 1.3rem; } } </style> <!-- Google Fonts --> <link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Playfair+Display:wght@700&display=swap" rel="stylesheet"> </head> <body> <div class="container"> <!-- Header --> <header> <h1>Poetry · Music · Gaming</h1> <p>Where Classical Poetry Meets Modern Esports</p> </header> <!-- Poem Section --> <section id="poem"> <h2>"Ascending the Heights" - Du Fu (Tang Dynasty)</h2> <div class="poem"> <div class="poem-title">Ascending the Heights</div> <div class="poem-author">By Du Fu (712-770 AD)</div> <div class="poem-content"> <div class="poem-line">The wind so swift, the sky so wide, apes wail and cry;</div> <div class="poem-line">Water so clear and beach so white, birds wheel and fly.</div> <div class="poem-line">The boundless forest sheds its leaves shower by shower;</div> <div class="poem-line">The endless river rolls its waves hour after hour.</div> <div class="poem-line">A thousand miles from home, I'm grieved at autumn's plight;</div> <div class="poem-line">Ill now and then for years, alone I'm on this height.</div> <div class="poem-line">Living in times so hard, at frosted hair I pine;</div> <div class="poem-line">Cast down by poverty, I have to give up wine.</div> </div> </div> <p style="text-align: center; margin-top: 20px; font-style: italic;">Translated by Xu Yuanchong</p> </section> <!-- Music MV Section --> <section id="music"> <h2>"Ticking Away" - Valorant Champions 2023 Theme</h2> <div class="player-container"> <iframe width="560" height="315" src="https://www.youtube.com/embed/CdZN8PI3MqM?si=iaAwrEvd_YR1UxGH" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> </div> <div class="music-info"> <p><strong>Artist:</strong> Riot Games Music Team</p> <p><strong>Released:</strong> August 6, 2023</p> <p><strong>Event:</strong> Valorant Champions 2023 Grand Finals</p> <p><strong>Description:</strong> The official anthem for the 2023 Valorant Champions Tour, capturing the intensity and global spirit of the tournament.</p> </div> </section> <!-- Game Introduction Section --> <section id="game"> <h2>Valorant - Tactical Shooter Masterpiece</h2> <div class="game-info"> <div class="game-text"> <p>Valorant is a free-to-play tactical first-person shooter developed and published by Riot Games. Combining precise gunplay with unique character abilities, it has become a premier esports title since its 2020 release.</p> <div class="game-features"> <div class="feature-card"> <h3>Agent System</h3> <p>20+ unique Agents with special abilities</p> </div> <div class="feature-card"> <h3>Weapon Arsenal</h3> <p>17 weapons across 6 categories</p> </div> <div class="feature-card"> <h3>Competitive</h3> <p>Ranked mode with VCT global tournaments</p> </div> <div class="feature-card"> <h3>Map Design</h3> <p>7 tactically diverse maps</p> </div> </div> <h3>Core Gameplay</h3> <p>Matches are 25-round games where attackers try to plant a Spike while defenders attempt to stop them. The economy system forces strategic buying decisions each round. Valorant's 128-tick servers ensure precise hit registration where every millisecond counts[^1].</p> <h3>Esports Impact</h3> <p>Valorant Champions Tour (VCT) features international tournaments with millions in prizes. The 2023 Champions in Los Angeles set viewership records with over 1.4 million concurrent viewers[^2].</p> </div> <div class="screenshot"> <img src="https://images.contentstack.io/v3/assets/bltb6530b271fddd0b1/blt158572a7e9a2121e/62a0940b7fdb2a6d4f0dbb80/V_AGENTS_587x900_Brimstone.png" alt="Valorant Agent Brimstone"> </div> </div> </section> <!-- Footer --> <footer> <p>© 2023 Poetry · Music · Gaming | Fusion of Classical and Modern Culture</p> </footer> </div> </body> </html> 这是我的网页代码,现在我要让视频位置和尺寸合适,给出修改后的代码
最新发布
06-15
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>高三勇者大冒险:终极备考RPG指南</title> <style> /* 游戏风格基础设置 */ :root { --quest-blue: #4e73df; --epic-purple: #6f42c1; --rare-green: #1cc88a; --common-gray: #858796; --legendary-orange: #f6c23e; --health-red: #e74a3b; --mana-blue: #36b9cc; --stamina-yellow: #f6c23e; --dark-bg: #2a3042; --light-text: #f8f9fc; } @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Noto+Sans+SC:wght@400;700&display=swap'); body { background-color: var(--dark-bg); color: var(--light-text); font-family: 'Noto Sans SC', sans-serif; line-height: 1.6; background-image: url('https://img.freepik.com/free-vector/pixel-art-game-background-nature-landscape_107791-740.jpg'); background-size: cover; background-attachment: fixed; padding: 0; margin: 0; } .rpg-container { max-width: 1000px; margin: 0 auto; background-color: rgba(42, 48, 66, 0.9); border: 4px solid var(--epic-purple); border-radius: 10px; box-shadow: 0 0 30px rgba(110, 66, 193, 0.5); overflow: hidden; } /* 游戏标题样式 */ .rpg-header { background: linear-gradient(135deg, var(--quest-blue), var(--epic-purple)); padding: 30px; text-align: center; position: relative; border-bottom: 5px solid var(--legendary-orange); } .rpg-title { font-family: 'Press Start 2P', cursive; font-size: 2.2rem; color: white; text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; margin-bottom: 15px; letter-spacing: 2px; } .rpg-subtitle { font-size: 1.2rem; color: rgba(255,255,255,0.8); font-weight: bold; } /* 角色状态栏 */ .character-status { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 15px; background-color: rgba(0,0,0,0.3); border-bottom: 2px solid var(--quest-blue); } .status-bar { display: flex; flex-direction: column; align-items: center; } .status-label { font-size: 0.8rem; color: var(--light-text); margin-bottom: 5px; } .status-value { font-weight: bold; font-size: 1.2rem; } .health { color: var(--health-red); } .mana { color: var(--mana-blue); } .stamina { color: var(--stamina-yellow); } .level { color: var(--rare-green); } /* 任务日志区域 */ .quest-log { padding: 20px; } .chapter-title { font-family: 'Press Start 2P', cursive; font-size: 1.2rem; color: var(--legendary-orange); margin: 30px 0 20px; padding-bottom: 10px; border-bottom: 2px dashed var(--epic-purple); text-shadow: 2px 2px 0 #000; } /* 任务卡片样式 */ .quest-card { background: linear-gradient(135deg, rgba(46, 52, 78, 0.8), rgba(32, 38, 58, 0.8)); border: 2px solid var(--quest-blue); border-radius: 8px; padding: 15px; margin-bottom: 20px; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.3); transition: transform 0.3s; } .quest-card:hover { transform: translateY(-5px); border-color: var(--rare-green); } .quest-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .quest-name { font-weight: bold; font-size: 1.1rem; color: white; display: flex; align-items: center; } .quest-type { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; margin-left: 10px; } .main-quest { background-color: var(--epic-purple); } .daily-quest { background-color: var(--quest-blue); } .skill-quest { background-color: var(--rare-green); } .event-quest { background-color: var(--legendary-orange); color: #000; } .quest-rewards { display: flex; } .reward { margin-left: 10px; font-size: 0.8rem; background-color: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 4px; border: 1px solid var(--common-gray); } .quest-description { margin: 10px 0; line-height: 1.5; } .quest-objectives { margin-top: 15px; } .objective { display: flex; align-items: center; margin-bottom: 8px; padding-left: 25px; position: relative; } .objective:before { content: "◻"; position: absolute; left: 5px; color: var(--common-gray); } .objective.completed:before { content: "✓"; color: var(--rare-green); } /* 技能树样式 */ .skill-tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin-top: 20px; } .skill-card { background-color: rgba(32, 38, 58, 0.8); border: 2px solid var(--common-gray); border-radius: 8px; padding: 15px; transition: all 0.3s; } .skill-card:hover { border-color: var(--rare-green); box-shadow: 0 0 15px rgba(28, 200, 138, 0.3); } .skill-name { font-weight: bold; color: white; margin-bottom: 5px; display: flex; justify-content: space-between; } .skill-level { color: var(--legendary-orange); } .skill-description { font-size: 0.9rem; color: rgba(255,255,255,0.7); } .cooldown { margin-top: 10px; font-size: 0.8rem; color: var(--mana-blue); } /* 游戏底部区域 */ .rpg-footer { text-align: center; padding: 20px; background-color: rgba(0,0,0,0.5); border-top: 2px solid var(--epic-purple); } .save-button { background: linear-gradient(135deg, var(--rare-green), #17a673); color: white; border: none; padding: 12px 25px; font-size: 1.1rem; font-weight: bold; border-radius: 50px; cursor: pointer; box-shadow: 0 5px 15px rgba(28, 200, 138, 0.4); transition: all 0.3s; } .save-button:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(28, 200, 138, 0.6); } /* 响应式设计 */ @media (max-width: 768px) { .character-status { grid-template-columns: repeat(2, 1fr); } .rpg-title { font-size: 1.5rem; } .skill-tree { grid-template-columns: 1fr; } } </style> </head> <body> <div class="rpg-container"> <div class="rpg-header"> <h1 class="rpg-title">高三勇者大冒险</h1> <p class="rpg-subtitle">终极备考RPG指南 · 2025届黄金版</p> </div> <div class="character-status"> <div class="status-bar"> <span class="status-label">生命值</span> <span class="status-value health">❤️ 85/100</span> </div> <div class="status-bar"> <span class="status-label">专注力</span> <span class="status-value mana">🔵 70/100</span> </div> <div class="status-bar"> <span class="status-label">耐力</span> <span class="status-value stamina">🟡 90/100</span> </div> <div class="status-bar"> <span class="status-label">等级</span> <span class="status-value level">⭐ Lv.5</span> </div> </div> <div class="quest-log"> <h2 class="chapter-title">第一章: 新手村准备</h2> <div class="quest-card"> <div class="quest-header"> <span class="quest-name">装备你的武器库 <span class="quest-type main-quest">主线任务</span> </span> <div class="quest-rewards"> <span class="reward">EXP +200</span> <span class="reward">金币 +500</span> </div> </div> <div class="quest-description"> 收集并整理你的学习装备:五科笔记本、错题本、历年真题集、彩色标记笔。记得定期维护你的装备! </div> <div class="quest-objectives"> <div class="objective completed">购买各科笔记本</div> <div class="objective completed">准备错题本系统</div> <div class="objective">收集近5年真题</div> <div class="objective">建立文具补给包</div> </div> </div> <h2 class="chapter-title">第二章: 每日修行</h2> <div class="quest-card"> <div class="quest-header"> <span class="quest-name">晨读的智慧 <span class="quest-type daily-quest">每日任务</span> </span> <div class="quest继续完成代码
05-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值