简体   繁体   English

HTML / CSS字体大小

[英]HTML/CSS Font size

i have a problem 我有个问题

i'm trying to edit a website it has a scroller (behavior is like a inverted waterfall) the website shows events (data) already recorded in the database... 我正在尝试编辑一个具有滚动条的网站(行为就像倒瀑布一样),该网站显示数据库中已记录的事件(数据)...

i want to change the font size of the scroller, i tried to change all the labels there and nothing. 我想更改滚动条的字体大小,我尝试更改所有标签,没有任何更改。

this is the CSS block 这是CSS块

<style type="text/css">

body {
font-family: "Engravers MT", "Engravers MT",sans-serif;
line-height: 1em;
color: #f0edd9;
font-weight:bold;
font-size: 40px;
background-color:#8A0829;
}
pscroller1{
width: 500px;  
height: 560px; 
font-family: "old republic", "old republic";
font-size:50px;
border: 1px solid black;
padding: 5px;
background: red;
}
</style>

this is the scroller, i didn't do that, it was made by someone else. 这是滚动条,我没有这样做,它是由其他人制作的。

<script type="text/javascript">
var pausecontent=new Array() 
</script>


<script type="text/javascript">
function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and              pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div

document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative;        overflow: hidden"><div class="innerDiv" style="position: absolute;  width: 100%"   id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute;     width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after     0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

here is how it set the message in the scroller 这是它如何在滚动条中设置消息

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}

this is the body: 这是身体:

<body>
<!--<div align="center">
<img src="picture1.fw.png" align="absmiddle"/>
</div>
!-->
<div align="LEFT" style="width:1000px "> 
<div style="height:570px; width:50%; float:right; background-color:#8A0829">

<?php
require_once('functions.php'); 
$phparray=events();
for($i=0; $i <count($phparray); $i++ )
        {
     echo '<script language="JavaScript"> pausecontent['.$i.'] = "'.$phparray[$i].'";</script>';    
        } 
?>

<script type="text/javascript" >
document.writeln("EVENTS")
new pausescroller(pausecontent, "pscroller1", "", 5000)
document.write("<br />")
function refresh(time) {setTimeout("location.reload(true);",time);}
refresh(43200000);   </script>

</div>
</div>
<div align="right"> EVENTS</div>
<div align="center" style="height:570px; width:300px; float:LEFT; background-    color:#8A0829">

<embed src="video.vob" autostart="true" loop ="true" width="500" height="570" > 

</div>
</div>
<div align="center">
<img src="background.jpg" align="absmiddle"/>
</div>
</body>

like you can see in the new pausescroller(pausecontent, "pscroller1", "", 5000) document.write(" 就像您在新的pausescroller(pausecontent,“ pscroller1”,“”,5000)中看到的一样document.write(“
") “)

the pscroller1 should change the font color and size of the pausecontent but it does only change the style of the font of the data, although the return data of document.write (UNDEFINED) is working fine, it's size, style and color can be changed pscroller1应该更改pausecontent的字体颜色和大小,但是它只会更改数据字体的样式,尽管document.write(UNDEFINED)的返回数据工作正常,但是可以更改其大小,样式和颜色

pscroller1 is not an html entity. pscroller1不是HTML实体。 You cannot style it like that. 您无法像这样设置样式。

You can add an ID or a class to the 'pscroller' and style that 您可以向“ pscroller”添加ID或类,并设置其样式

a{ <- html entity a{ -html实体

.someClass{ <- styling a class .someClass{ <-设计类的样式

#someID{ <- styling an ID #someID{ <-设置ID的样式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM