[英]How to add a css font-family?
我下載了字體系列 Tokyo-Outline,但它不適用。 這不僅僅是這個字體的問題,所有不在 css 中的字體更改都不起作用。
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
@font-face {
font-family: 'Tokyo-Outline';
src: url('Tokyo-Outline.eot?#iefix') format('embedded-opentype'), url('Tokyo-Outline.otf') format('opentype'),
url('Tokyo-Outline.woff') format('woff'), url('Tokyo-Outline.ttf') format('truetype'), url('Tokyo-Outline.svg#Tokyo-Outline') format('svg');
font-weight: normal;
font-style: normal;
}
*{
margin:0;
padding:0;
box-sizing:border-box;
font-family: 'Tokyo-Outline';
}
body{
background-color: rgb(244, 129, 83);
}
.all{
position:absolute;
top:50%;
left:50%;
margin-left:-100px;/* half width*/
margin-top:-300px;/* half height*/
}
</style>
</head>
<body>
<div class="all">
<form class="input">
<h3> List</h3><input type="text" id="type"><button id="add">+</button>
</form>
<div class="list-container">
<ul class="list"></ul>
</div>
</div>
<script>
</script>
</body>
</html>
我正在添加填充文本,因為顯然“我沒有足夠的細節”。 你不必讀這個。 好吧,我有一個帶綠色莖的粉紅色仙人掌。
也許檢查網址路徑? 例如,您將它們放在字體文件夾中嗎? 如果是這樣,請嘗試類似: url('fonts/Tokyo-Outline.eot')。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.