Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 用“更改字体大小”;“更多切换”;_Javascript_Html_Css - Fatal编程技术网

Javascript 用“更改字体大小”;“更多切换”;

Javascript 用“更改字体大小”;“更多切换”;,javascript,html,css,Javascript,Html,Css,我正在尝试更改中文本的字体大小。以下css出现错误- .comment more{ font-size: 50px; } 正确的方法是- .comment.more{ font-size: 50px; } 完整代码 $(文档).ready(函数(){ var ellipseText=“…”, moretext=“更多”, lesstext=“Less”, showChar; $('.more')。每个(函数(){ var content=$(this.html(); showChar=co

我正在尝试更改
中文本的字体大小。以下css出现错误-

.comment more{
font-size: 50px;
}
正确的方法是-

.comment.more{
font-size: 50px;
}
完整代码

$(文档).ready(函数(){
var ellipseText=“…”,
moretext=“更多”,
lesstext=“Less”,
showChar;
$('.more')。每个(函数(){
var content=$(this.html();
showChar=content.search(//);
如果(content.length>showChar&&showChar!=-1){
var c=content.substr(0,showChar);
var h=content.substr(showChar,content.length-showChar);
var html=c+''+ellipseText+''+h+'';
$(this).html(html);
}
});
$(“.morelink”)。单击(函数(){
if($(this).hasClass(“更少”)){
$(此).removeClass(“更少”);
$(this.html(moretext);
}否则{
$(此).addClass(“更少”);
$(this.html(lesstext);
}
$(this.parent().prev().toggle();
$(this.prev().toggle();
返回false;
});
});
a{
颜色:#108cff;
}
a:参观了{
颜色:#108cff;
}
a、 莫林克{
文字装饰:无;
大纲:无;
字体:斜体;
}
.Morespan内容{
显示:无;
}
.评论.更多{
字体大小:50px;
}

选择体育场设计的国际比赛
建筑师和建筑商预计将于11月举行。