分类
代码

部分discuz代码:萌化隐藏内容提示框,手机版支持媒体代码,LOGO晃动效果

萌化隐藏内容提示框:


1
2
3
4
    .locked{height:161px;padding:0px !important;background:#FFF url(http://ww3.sinaimg.cn/large/dc9e57cbjw1ebkpqqn5o2j20bj04haae.jpg) no-repeat right bottom !important;border-radius:5px !important;width:415px !important;text-indent:15px;line-height:160px;overflow:hidden !important;}
    .locked:hover{background:#FFF url(http://ww2.sinaimg.cn/large/dc9e57cbjw1ebkq3m54fij20bj04hjrn.jpg) no-repeat right bottom !important;-webkit-transition:all 0.3s linear 0s;-moz-transition:all 0.3s linear 0s;-o-transition:all 0.3s linear 0s;transition:all 0.3s linear 0s;}
    .locked:active{background:#FFF url(http://ww4.sinaimg.cn/large/005AUVH3jw1ek59mrq8ncj30bj04hq36.jpg) no-repeat right bottom !important;}
    .locked .viewpay

代码放在common/module.css    


1
.locked a, .attach_nopermission a { color: {HIGHLIGHTLINK}; }
下边

手机版支持媒体代码:

打开source/function/function_discuzcode.php
查找


1
$message = preg_replace("/\[flash(=(\d+),(\d+))?\]\s*([^\[\<\r\n]+?)\s*\[\/flash\]/is", "[media]\\4[/media]", $message);

修改为


1
$message = preg_replace("/\[flash(=(\d+),(\d+))?\]\s*([^\[\<\r\n]+?)\s*\[\/flash\]/", "<embed src='\\4' allowFullScreen='true' quality='high' width='260' height='150' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash'></embed>", $message);

保存后手机版的discuz 也能播放网络视频了,代码位置大概在206行左右。

LOGO晃动效果


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#hd h2{animation-duration:0.4s;-webkit-animation-duration:0.4s;anim
ation-name:afastr;-webkit-animation-name:afastr;}
#um,#toptb,.pns{animation-duration:1s;-webkit-animation-duration:1s;an
imation-name:afastr;-webkit-animation-name:afastr;}
#hd h2{transition:all .15s ease-out;-webkit-transition:all .15s ease-o
ut;-moz-transition:all .15s ease-out;-o-transition:all .15s

ease-out;}
#hd h2:hover{transform:scale(1.07) rotate(-1deg);-webkit-transform:sca
le(1.07) rotate(-1deg);-moz-transform:scale(1.07) rotate(-

1deg);-o-transform:scale(1.07) rotate(-1deg);}
.avt{transition:all .15s ease-out;-webkit-transition:all .15s ease-out
;-moz-transition:all .15s ease-out;-o-transition:all .15s

ease-out;}
.avt:hover{transform:scale(1.07);-webkit-transform:scale(1.07);-moz-tr
ansform:scale(1.07);-o-transform:scale(1.07);}

这一段代码是鼠标放到LOGO上晃动效果  放在common.css

大概#hd h2 { padding: 0 20px 8px 0; float: left; }下面就能实现

以上为窝整理的discuz部分改造代码,大家可以自由变换内容。(代码均来自网络)

发表评论

您的电子邮箱地址不会被公开。