Home  >  Article  >  Web Front-end  >  CSS3 learning selector, font_html/css_WEB-ITnose

CSS3 learning selector, font_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:05:25957browse

??

Attribute selector:
[att*=val]{}If the att element attribute value contains the val specified character, use this style
[att^= val]{}If the starting character of the att element attribute value is val, use this style
[att&=val]{}If the ending character of the att element attribute value is val, use this style

Example:

<style type="text/css">[id^=section1]{		background-color: yellow;	}</style>

<div id="section2">示例文本2</div>	<div id="subsection1">示例文本1-1</div>	<div id="subsection2">示例文本1-2</div>	<div id="subsection2-1">示例文本2-1</div>	<div id="subsection2-2">示例文本2-2</div>


target selection Server:

When the href jumps within the page, redefine the attributes of the target


font font: The special fonts applied in the previous version of the web page were only used by the client The font can be displayed normally only when the font is available on the client,

and css3 supports obtaining fonts from the server, which means that if you put the font file in the font folder, you can use this font directly through the url

This new change really brings great convenience. Example:

@font-face{		font-family: WebFont;		src:url('font/FZJZFW.TTF') format("truetype");		font-weight: normal;	}
article{		font-family: WebFont;	}

<article>	<h1>文章内容</h1>	<p>网页级内容区块的正文</p>	<section>		<h3>section级内容的正文</h3>		<p>section级内容区块的正文</p>	</section></article>



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn