给定一个数据生成html,将给定数据源生成静态HTML页面持久化到项目之外的硬盘...

这篇博客详细探讨了字体大小调整的实现方法,通过JavaScript函数动态改变内容区域的字体大小,提供了大、中、小三种选择,方便用户阅读。此外,文章还介绍了相关HTML和CSS样式设置,确保页面布局的响应式。
摘要由CSDN通过智能技术生成
###knowledgeName###

.div{ margin:20px auto;max-width: 1000px}

.title{

font-size: 20px;

font-weight: bold;

margin-bottom: 20px;

}

.date{

border-bottom: 1px solid #9a9a9a;

padding:016px 16px;

font-size: 15px;

}

.content{

text-align: left;

padding-top: 10px;

line-height: 30px;

}

.toolsBox {

height: 36px;

border: 1px solid #d8d8d8;

background: #fafbfb;

font-size: 14px;

color: #666;

line-height: 36px;

text-align: center;

margin-top: 70px;

}

.toolsBox a, .toolsBox i {

color: #666;

cursor: pointer;

font-style: normal;

text-decoration: none;

}

.toolsBox i.on {

color: #ff8400;

}

###knowledgeName###
###publishDate###
###htmlContent###
字体:【     】 【打印 】 【关闭】

function setFontSize(oElement,size){

var size= size || 14;

$(oElement).css({'fontSize': size+"px"});

}

$('.toolsBox i').eq(0).click(function() {

setFontSize('.content p','16');

$(this).siblings('i').removeClass('on');

$(this).addClass('on');

});

$('.toolsBox i').eq(1).click(function() {

setFontSize('.content p','14');

$(this).siblings('i').removeClass('on');

$(this).addClass('on');

});

$('.toolsBox i').eq(2).click(function() {

setFontSize('.content p','12');

$(this).siblings('i').removeClass('on');

$(this).addClass('on');

});

})();

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值