当超链接位于页面布局中时,a:active不起作用 [英] a:active doesn't work when the hyperlink is in the page layout

查看:77
本文介绍了当超链接位于页面布局中时,a:active不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个发布页面,该页面与具有自定义顶部导航的页面布局相关联.这是< style>以及页面布局中的链接

I have a publishing page which is associated with a the page layout that has a custom top navigation. Here is the <style> and the link in the page layout

<style type="text/css"> a:active { color: green; } </style>

< a href ="/Pages/default.aspx>第一页</a>

<a href="/Pages/default.aspx">1st page</a>

由于某些原因,当我使用default.aspx时,活动样式不适用于链接

For some reasons, the active style doesn't apply to the link when I am on default.aspx

我也尝试了以下方法,没有任何反应.

I tried the following too, nothing happen.

<a href="/Pages/default.aspx" class="active">1st page</a>

请告知缺少的内容.

谢谢.


推荐答案

因此,您想在用户点击链接时将字体颜色设置为绿色吗?

您是否基于页面布局创建了default.aspx?

您可以尝试以下方法:

a:active {           

a:active {           

颜色 : 绿色 !important

            color:green !important;           

        }

最好的问候,


这篇关于当超链接位于页面布局中时,a:active不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆