我有这个脚本:
<?php
if(urldecode($_SERVER['REQUEST_URI']) == "/?articles")
{
include("Articles.php");
}
?>
Run Code Online (Sandbox Code Playgroud)
这允许我为页面设置自定义 URL。现在,当我需要这样的 URL 时就会出现问题:
/?articles | Page that contains newest articles which loads when user clicks "< Previous" button
/?articles&1 | Page that contains older articles which loads when user clicks "Next >" button
/?articles&2 | Page that contains older than older articles
/?articles&3 | Page that contains old articles
/?articles&4 | Page that contains old articles
/?articles&5 | Page that contains oldest articles
/?articles&6 | Page that contains oldest articles, …Run Code Online (Sandbox Code Playgroud) 我想要隐藏一个字母,并在链接中显示另一个字母,当然还有不同风格的字母悬停.例如:
这是一个...
...normal link.
Run Code Online (Sandbox Code Playgroud)
这是......
...hovêrêd lînk.
Run Code Online (Sandbox Code Playgroud)
怎么做到这一点?谢谢.
编辑: 是的,需要澄清 - 我只想更改特定字母(i➛î,eê)并更改悬停时的样式,而不是整个链接,因为链接在正常和悬停时都是相同的.
发布此内容的人
$('.class').hover(function()
{
$(this).data('i', $(this).text());
$(this).text("î");
},
function()
{
$(this).text($(this).data('i'));
}
);
Run Code Online (Sandbox Code Playgroud)
接近解决方案.只有这段代码会在悬停时更改整个链接,而不仅仅是字母.
我有一个样式链接。现在,我想在悬停时在链接的几个字母上设置另一种样式,这是另一种颜色。
例子:
这是正常链接
这是悬停时的标准AL链接,其中AL为斜体和其他颜色。