css logo图片嵌入
由
Deepseek提供支持
广告
有时我们为了不影响网站的加载速度我们会将图片放到css中,那么今天我们就让站点的logo嵌入的css,那它是怎么实现的呢?
css代码:
.logo {
display: block;
background-image: url(../img/logo.png);
background-repeat: no-repeat;
width: 195px;
height: 62px;
}
.logo {
margin-top: 25px;
text-indent: -999em;
}
a {
text-decoration: none;
}
a, address, blockquote, body, button, caption, dd, dl, fieldset, form, h1, h2, h3, h4, h5, h6, input, legend, li, ol, p, pre, span, td, textarea, th, ul {
margin: 0;
padding: 0;
}
user agent stylesheet
a:-webkit-any-link {
color: -webkit-link;
cursor: pointer;
text-decoration: underline;
}
h1, h2, h3, h4, h5, h6 {
font-size: 100%;
}
user agent stylesheet
h1 {
font-size: 2em;
font-weight: bold;
}
HTML:
<div class="header">
<div class="container">
<h1><a class="logo" href="/">Rookie</a></h1>
温馨提示 : 非特殊注明,否则均为©李联华的博客网原创文章,本站文章未经授权禁止任何形式转载;来自:俄亥俄州·哥伦布 ,欢迎您的访问!
文章链接:https://www.lilianhua.com/css-logo-image-embedding.html
文章链接:https://www.lilianhua.com/css-logo-image-embedding.html
English (US)
Español (ES)
Português (PT)
Français (CA)
Español (MX)
Español (VE)
Español (CO)
Español (AR)
Português (BR)
Quechua (PE)
Guaraní (PY)
简体中文 (ZH)
繁體中文 (HK)
日本語 (JP)
한국어 (KR)
हिन्दी (HI)
Pilipino (PH)
ไทย (TH)
Tiếng Việt (VN)
Bahasa Melayu (MY)
Bahasa Indonesia (ID)
বাংলা (BD)
اردو (PK)
සිංහල (LK)
ភាសាខ្មែរ (KH)
English (UK)
Français (FR)
Deutsch (DE)
Italiano (IT)
Русский (RU)
Nederlands (NL)
Türkçe (TR)
Polski (PL)
Svenska (SE)
Norsk (NO)
Dansk (DK)
Suomi (FI)
Ελληνικά (GR)
Čeština (CZ)
Magyar (HU)
Română (RO)
Български (BG)
Српски (RS)
Українська (UA)

