Commit 38ba4c5f authored by wangqinghua's avatar wangqinghua

字体

parent bca69ed3
@import "../theme/icon";
@import "../theme/style";
html,ion-app.ios{
font-family: "webfont",serif !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.web-font {
font-family: "webfont",serif !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
p {
margin: 0;
}
......@@ -101,52 +114,6 @@ p {
left: 0px;
}
//tabs-icon
ion-icon {
&[class*="custom-"] {
margin: 0 5px 0 0;
vertical-align: middle;
$sz: 20px;
width: $sz;
height: $sz;
}
// custom icons
&[class*="home-on"] {
background: url(../assets/imgs/tabs/icon-home-on.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="home-off"] {
background: url(../assets/imgs/tabs/icon-home-off.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="contact-on"] {
background: url(../assets/imgs/tabs/icon-contact-on.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="contact-off"] {
background: url(../assets/imgs/tabs/icon-contact-off.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="notice-on"] {
background: url(../assets/imgs/tabs/icon-notice-on.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="notice-off"] {
background: url(../assets/imgs/tabs/icon-notice-off.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="owner-on"] {
background: url(../assets/imgs/tabs/icon-onwer-on.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="owner-off"] {
background: url(../assets/imgs/tabs/icon-owner-off.png) no-repeat 50% 50%;
background-size: contain;
}
}
//border
.border-none {
......
<html>
<head>
<meta charset="utf-8"/>
<title>webfont</title>
<style type="text/css">
*{margin: 0;padding: 0;list-style: none;}
/*
KISSY CSS Reset
理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。
2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。
3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。
特色:1. 适应中文;2. 基于最新主流浏览器。
维护:玉伯<lifesinger@gmail.com>, 正淳<ragecarrier@gmail.com>
*/
/** 清除内外边距 **/
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
dl, dt, dd, ul, ol, li, /* list elements 列表元素 */
pre, /* text formatting elements 文本格式元素 */
form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */
th, td /* table elements 表格元素 */ {
margin: 0;
padding: 0;
}
/** 设置默认字体 **/
body,
button, input, select, textarea /* for ie */ {
font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
}
h1, h2, h3, h4, h5, h6 { font-size: 100%; }
address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */
code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */
small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */
/** 重置列表元素 **/
ul, ol { list-style: none; }
/** 重置文本格式元素 **/
a { text-decoration: none; }
a:hover { text-decoration: underline; }
/** 重置表单元素 **/
legend { color: #000; } /* for ie6 */
fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */
button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */
/* 注:optgroup 无法扶正 */
/** 重置表格元素 **/
table { border-collapse: collapse; border-spacing: 0; }
/* 清除浮动 */
.ks-clear:after, .clear:after {
content: '\20';
display: block;
height: 0;
clear: both;
}
.ks-clear, .clear {
*zoom: 1;
}
.main {padding: 30px 100px;}
.main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;}
.helps{margin-top:40px;}
.helps pre{
padding:20px;
margin:10px 0;
border:solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists li{
float:left;
width: 100px;
height:150px;
text-align: center;
}
.icon_lists .icon{
font-size: 42px;
line-height: 100px;
margin: 10px 0;
color:#333;
-webkit-transition: font-size 0.25s ease-out 0s;
-moz-transition: font-size 0.25s ease-out 0s;
transition: font-size 0.25s ease-out 0s;
}
.icon_lists .icon:hover{
font-size: 100px;
}
@font-face {
font-family: "webfont";
src: url('webfont.eot'); /* IE9 */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff') format('woff'), /* chrome、firefox */
url('webfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url('webfont.svg#webfont') format('svg'); /* iOS 4.1- */
}
.web-font {
font-family: "webfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</style>
</head>
<body>
<div class="main">
<h1>webfont 字体预览</h1>
<p class="web-font">说金钱是罪恶,都在捞;说美女是祸水,都想要;说高处不胜寒,都在爬;说烟酒伤身体,都不戒;说天堂最美好,都不去!</p>
<div class="helps">
第一步:使用font-face声明字体
<pre>
@font-face {
font-family: 'webfont';
src: url('webfont.eot'); /* IE9 */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff') format('woff'), /* chrome、firefox */
url('webfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url('webfont.svg#webfont') format('svg'); /* iOS 4.1- */
}
</pre>
第二步:定义使用webfont的样式
<pre>
.web-font {
font-family: "webfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</pre>
第三步:为文字加上对应的样式
<pre>
&lt;i class="web-font"&gt;说金钱是罪恶,都在捞;说美女是祸水,都想要;说高处不胜寒,都在爬;说烟酒伤身体,都不戒;说天堂最美好,都不去!&lt;/i&gt;
</pre>
</div>
</div>
</body>
</html>
This diff is collapsed.
......@@ -61,6 +61,7 @@
<img src="./assets/imgs/home/icon-more.png" alt="">
<label class="label2-2 more2-2">更多应用</label>
</div>
<div class="web-font">说金钱是罪恶,都在捞;说美女是祸水,都想要;说高处不胜寒,都在爬;说烟酒伤身体,都不戒;说天堂最美好,都不去!</div>
<!--<div class="card" (click)="readBook()">-->
<!--<img src="./assets/imgs/home/icon-more.png" alt="">-->
<!--<label class="label2-2 more2-2">阅读</label>-->
......
......@@ -14,8 +14,8 @@ export class AppGlobal {
//接口基地址
// static domain = "http://101.89.112.92:80"; //正式环境
static domain = "http://180.168.156.212:2931"; //测试环境
// static domain = ""; //本地环境
// static domain = "http://180.168.156.212:2931"; //测试环境
static domain = ""; //本地环境
//图片地址
......
.tab-button[aria-selected=true] .ion-md-myhome:before{
content: url("./../assets/imgs/tab-01.svg");
}
.tab-button[aria-selected=false] .ion-md-myhome:before{
content: url("./../assets/imgs/tab-05.svg");
}
.tab-button[aria-selected=true] .ion-md-mycontact:before{
content: url("./../assets/imgs/tab-04.svg");
}
.tab-button[aria-selected=false] .ion-md-mycontact:before{
content: url("./../assets/imgs/tab-08.svg");
}
.tab-button[aria-selected=true] .ion-md-mymine:before{
content: url("./../assets/imgs/tab-02.svg");
}
.tab-button[aria-selected=false] .ion-md-mymine:before{
content: url("./../assets/imgs/tab-06.svg");
}
.tab-button-text{
margin-top: 0 !important;
}
.color-333{color: #333;}
.color-666{color: #666;}
.color-999{color: #999;}
.color-fff{color: #fff;}
.color-red{color: red;}
.color-green{color: #1ec659;}
.color-24bafc{color: #24bafc;}
.border{border: 1px solid #ddd;}
@for $i from 0 through 101{
.margin-right-#{$i}{
margin-right: #{$i}px;
}
.margin-left-#{$i}{
margin-left: #{$i}px;
}
.margin-top-#{$i}{
margin-top: #{$i}px;
//tabs-icon
ion-icon {
&[class*="custom-"] {
margin: 0 5px 0 0;
vertical-align: middle;
$sz: 20px;
width: $sz;
height: $sz;
}
.margin-bottom-#{$i}{
margin-bottom: #{$i}px;
// custom icons
&[class*="home-on"] {
background: url(../assets/imgs/tabs/icon-home-on.png) no-repeat 50% 50%;
background-size: contain;
}
.margin-#{$i}{
margin: #{$i}px;
&[class*="home-off"] {
background: url(../assets/imgs/tabs/icon-home-off.png) no-repeat 50% 50%;
background-size: contain;
}
.padding-#{$i}{
padding: #{$i}px;
&[class*="contact-on"] {
background: url(../assets/imgs/tabs/icon-contact-on.png) no-repeat 50% 50%;
background-size: contain;
}
.padding-right-#{$i}{
padding-right: #{$i}px;
&[class*="contact-off"] {
background: url(../assets/imgs/tabs/icon-contact-off.png) no-repeat 50% 50%;
background-size: contain;
}
.padding-left-#{$i}{
padding-left: #{$i}px;
&[class*="notice-on"] {
background: url(../assets/imgs/tabs/icon-notice-on.png) no-repeat 50% 50%;
background-size: contain;
}
.padding-top-#{$i}{
padding-top: #{$i}px;
&[class*="notice-off"] {
background: url(../assets/imgs/tabs/icon-notice-off.png) no-repeat 50% 50%;
background-size: contain;
}
.padding-bottom-#{$i}{
padding-bottom: #{$i}px;
&[class*="owner-on"] {
background: url(../assets/imgs/tabs/icon-onwer-on.png) no-repeat 50% 50%;
background-size: contain;
}
}
@for $i from 0 through 51{
@for $j from 0 through 51{
.margin-#{$i}-#{$j}{
margin: #{$i}px #{$j}px ;
}
.padding-#{$i}-#{$j}{
padding: #{$i}px #{$j}px ;
}
}
}
//flex布局
.flex{
display: flex;
}
@for $j from 1 to 25{
.flex-#{$j}{
flex: #{$j};
&[class*="owner-off"] {
background: url(../assets/imgs/tabs/icon-owner-off.png) no-repeat 50% 50%;
background-size: contain;
}
}
\ No newline at end of file
.main-color{
color: color($colors,danger);
color: $main-color;
}
.border{border: 1px solid #ddd;}
.color-333{color: #333;}
.color-666{color: #666;}
.color-999{color: #999;}
.color-fff{color: #fff;}
.color-red{color: red;}
.color-green{color: #1ec659;}
.color-24bafc{color: #24bafc;}
//margin,padding
@for $i from 0 through 101{
.margin-right-#{$i}{
margin-right: #{$i}px;
}
.margin-left-#{$i}{
margin-left: #{$i}px;
}
.margin-top-#{$i}{
margin-top: #{$i}px;
}
.margin-bottom-#{$i}{
margin-bottom: #{$i}px;
}
.margin-#{$i}{
margin: #{$i}px;
}
.padding-#{$i}{
padding: #{$i}px;
}
.padding-right-#{$i}{
padding-right: #{$i}px;
}
.padding-left-#{$i}{
padding-left: #{$i}px;
}
.padding-top-#{$i}{
padding-top: #{$i}px;
}
.padding-bottom-#{$i}{
padding-bottom: #{$i}px;
}
}
//margin,padding
@for $i from 0 through 51{
@for $j from 0 through 51{
.margin-#{$i}-#{$j}{
margin: #{$i}px #{$j}px ;
}
.padding-#{$i}-#{$j}{
padding: #{$i}px #{$j}px ;
}
}
}
//flex布局
.flex{
display: flex;
}
@for $j from 1 to 25{
.flex-#{$j}{
flex: #{$j};
}
}
\ No newline at end of file
......@@ -40,7 +40,7 @@ $colors: (
light: #f4f4f4,
dark: #222
);
$main-color:#e42417;
// App iOS Variables
// --------------------------------------------------
......@@ -84,6 +84,6 @@ $colors: (
// Fonts
// --------------------------------------------------
@import "roboto";
@import "noto-sans";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment