◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
Widget talk:ProfileCard/total
大预览图好大
看不到全图。如果我没有理解错的话,<includeonly> 里应该是可以带 <style> 的?折腾了一下 CSS 样式,但是想不到什么好的方法:
<includeonly><style> #profilecardview { position: fixed; top: 0; right: 0; border: 1px solid grey; width: 50vw; height: 28.125vw; text-align: center; line-height: 28.125vw; } .profilecard img:hover { box-shadow: 0 0 12px 2px #eaeaea; } </style> <script type="text/javascript">(window.RLQ=window.RLQ||[]).push(function(){ var view = new Image(); view.setAttribute("width", "1024px"); view.setAttribute("height", "576px"); // 原来是 760px 的,但是 16:9 图片应该是 576px ? view.setAttribute("id", "profilecardview"); view.setAttribute("alt", "加载中"); view.style.visibility = "hidden"; document.querySelector("#bodyContent").appendChild(view); function display(element){ var scrstr = this.getAttribute("src"); view.setAttribute("src", "http://www.gfwiki.org/images/" + scrstr.slice(14, scrstr.indexOf("/" + Number($(this).width()) +"px"))); view.style.visibility = "visible"; } function undisplay(){ view.style.visibility = "hidden"; view.setAttribute("src", ""); } var card = $(".profilecard").children().children().children("img"); card.mouseover(display); card.mouseout(undisplay); })</script></includeonly>