html中加入特殊字体,在html中使用特殊字体

这篇博客探讨了一种创新的诗歌创作形式,通过从右往左的垂直排列,模仿古文效果。作者利用HTML和CSS实现了这种视觉艺术展示,结合特殊字体和文字布局,创造出独特的阅读体验。同时,博客还涉及到字体嵌入和样式控制,如字体家族、行高和字母间距等。
摘要由CSDN通过智能技术生成

目的:一首诗,要求从右往左读,垂直排列,类似古文

效果图:

021337142893431.png

html内容:

在html中使用特殊字体

p{font-size: 54px;}

南歌子词二首

柳枝词

一尺深红胜曲尘

天生旧物不如新

合欢桃核终堪恨

里许元来别有人

井底点灯深烛伊

共郎长行莫围棋

玲珑骰子安红豆

入骨相思知不知

index.css内容:

@font-face {

font-family: 'pinghei';

src: url('pinghei.eot');

src:

url('pinghei.eot?#font-spider') format('embedded-opentype'),

url('pinghei.woff') format('woff'),

url('pinghei.ttf') format('truetype'),

url('pinghei.svg') format('svg');

font-weight: normal;

font-style: normal;

}

@font-face {

font-family: 'font2';

src: url('font2.eot');

src:

url('font2.eot?#font-spider') format('embedded-opentype'),

url('font2.woff') format('woff'),

url('font2.ttf') format('truetype'),

url('font2.svg') format('svg');

font-weight: normal;

font-style: normal;

}

/*使用选择器指定字体*/

p{

/*-webkit-writing-mode: vertical-rl;*/

font-family: 'pinghei';

margin: 0 0.5em;

line-height: 1.2em;

letter-spacing: 10px;

}

span{

font-family: 'font2'

}

.realistic {

-webkit-writing-mode: vertical-rl;

color: $color;

font-size: 40px;

position: absolute;

top: $top;

left: -400px;

//-webkit-filter:contrast(7);

opacity: 1/(($steps*2));

transform-origin: 900px 280px;

max- 1200px;

transform: scale($scale,$scale) perspective($perspective) rotateY($rotationY) rotateX($rotationX);

text-shadow: 0 0 3px transparentize($color,0.4), 0 0 1px transparentize($color,0.8);

text-align: left;

}

源文件:

http://yunpan.cn/cwkdus2HhjZKB (提取码:9a47)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值