uni-app中使用iconfont

1.app.vue中引入

<script>
	
</script>

<style>
	/*每个页面公共css */
	@font-face {font-family: "iconfont";
	  src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAANoAAsAAAAAB3gAAAMcAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDHAqCOIIxATYCJAMQCwoABCAFhG0HQhudBhEVnCXIfh7YbtHQyPVK9x3i0zeFRtJ7Dh7+/Svvw2ABIXGVln8i4vTstwvoegoOuAECYNRuTVfFsggTobpkLctP/yNpd3r5PMMqlEJIhOSPe8ct6zycz7Jc/ppWm/Y+j7oA460BjbUpkAItkAS9YeyqpTio/RCAI6GSiera5m6saPAwAYiF8+ZMYM140Gg1bkVgrpirEdswYZXr5QywNfi++EpmVpCYFPig9tk105R/SPtQoQy7YVgZGNPZAXURKCAZaBBzK52TqCiSTOFod9bkAitWJEzVlPuhwm5HZtgwRv7yQKCQIMzgXGcAslFUwYc0ZoCAD7kcVUIFzEECfJA5VsAMDANrwcpgbyJQSN8wJZ19FzurAxv8pfMpI8ZF7t8YpFzOBtn2LH7woHdDdM8u7w2+YrbTBmHzm8Nep90+3Wdj7t/vMeYLocVUs/3hw75syr17fbceChkJ2W744hsfFvWc33jLFphTsa68WMbK8vLwuPDyMhWrysrDlcMVihaeuOzuoU066jWnTePakx0B0mLRmTsDhJceN3Hs2qtr5i+/1fWcJ5uhGy4fM+SVK8qmDMEaCgJV0pC2dseGQmIXFKkDMzMHOKOgSR1I5hTNj/7++LF7kkfSb4APUvPkYwB1R74Ge3VDVfyc37Bf7jo15lb83+qkAXhWNhwRuOw13QTeMNGZ+BVExyLtUNiktUUz3M3VRFNwT6wjscAPSICnF1OIPp1zQWDFJwGJhRBQWImWaEUymHAiG8xYKQNHktQtdsLLIhRCOwCJVgMQAN19QHJ1CxR3X4lW/MDE1x/M3FPgqLftmk5im7fZCRpFD/YNreOJqEU3Yf4Z6zgYSVOB+o4SWj8UaZ6Pn3BCmWJCeNSlKgEJj3AEh+EwMMzCHTpNG9W5yjKqelLqeEw2qghkKOQB6w20HDYhUV5tCp8/Q7VoYEhDQdv4DomgbR0UUnkHyYmfOhXcyiPBQ62kFAFEsBE4AjsaSISBubpXBzkq1QwIzSoZKkVd+XR5cXzDFYAjfL1OCiW0MGF+axrDCzJTE9tF4BgiJwk=') format('woff2')
	}
	
	.iconfont {
	  font-family: "iconfont" !important;
	  font-size: 16px;
	  font-style: normal;
	  -webkit-font-smoothing: antialiased;
	  -moz-osx-font-smoothing: grayscale;
	}
	
	.icon-jiahao:before {
	  content: "\e62f";
	}
	
	.icon-fanhui:before {
	  content: "\e641";
	}
	
	.icon-sousuo:before {
	  content: "\e636";
	}
	

</style>

2.index.vue

<view class=" tab-box">
			<view class="iconfont icon-jiahao">
			</view>
		</view>

 

上一篇:java获取json数组格式中的值


下一篇:CSS学习笔记1:字体样式属性