Home  >  Article  >  Web Front-end  >  Random announcements on the homepage of the website implemented by js Random announcements_Typical special effects

Random announcements on the homepage of the website implemented by js Random announcements_Typical special effects

WBOY
WBOYOriginal
2016-05-16 19:16:301135browse

Home Random Announcement Random Announcement


Search in default.html:

Insert code here



Random announcements on the homepage of the website implemented by js Random announcements_Typical special effects Random announcements on the homepage of the website implemented by js Random announcements_Typical special effects


Add it to the CSS file. Needless to say, you can change it to your favorite style
.pop1 { background-color: #FFFF00; border:1px solid #CBDFE9; color:#247CAB; text-align:left;
height:15px; line-height:15px; position:relative; margin-bottom:10px;}
.pop1 .blank { height:15px; width:0; }
It is logically universal~ Of course I didn’t test it with every program~ <script> <BR> tips = new Array(7); <BR> tips[0] = "痛苦来临时,不要总问:“为什么偏偏是我?” ----快乐降临时,你从没问过这个问题"; <BR> tips[1] = "衡课颐鞘欠窀蛔愕姆椒ǎ鞘ヒ磺星坪螅颐腔故O率裁础?nbsp; ----西方哲学"; <BR> tips[2] = "不在于你能否找到一个理想的伴侣,而在于你能否做一个理想的伴侣。 ----美满婚姻的秘密"; <BR> tips[3] = "富丽堂皇的婚礼,可能是一种交易;朴实无华的婚礼,往往有真正的爱情。 ----贫贱夫妻情更浓"; <BR> tips[4] = "说最想说的话,干最想干的事,爱最想爱的人。 ----真正的活法"; <BR> tips[5] = "有人总是感叹找不到爱情,究其原因却是,自己那颗爱人的心长满了青苔。 ----要人爱先学会爱人"; <BR> tips[6] = "让自己的技术在更多人面前展示,并给他(她)们带方便和愉悦! ----技术员的最大理想"; <br><br> index = Math.floor(Math.random() * tips.length); <BR> document.write(tips[index]); <BR></script>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn