加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

html – ‘Text-decoration:none’在Bootstrap中不起作用

发布时间:2020-12-14 22:30:29 所属栏目:资源 来源:网络整理
导读:在悬停时,我的文字链接有下划线.这是Bootstrap中的默认值. 我想保留这个,除非链接在某个div内. 我尝试的代码(和几个变体)不起作用. HTML: div class="wall-entry span5" a href="" img src="http://www.placehold.it/290x163" / div class="wall-address" p
在悬停时,我的文字链接有下划线.这是Bootstrap中的默认值.

我想保留这个,除非链接在某个div内.

我尝试的代码(和几个变体)不起作用.

HTML:

<div class="wall-entry span5">
            <a href="">
            <img src="http://www.placehold.it/290x163" />
            <div class="wall-address">
                <p>Burgundy Street</p>
                <p>New Orleans,LA</p>
                <p>USA</p>
            </div>
            </a>
        </div>

我的CSS:

.wall-entry     {
                background-color: @black;
                position: relative;

            img {
                opacity:0.4;
                filter:alpha(opacity=40); /* For IE8 and earlier */
                }

            div {
                position: absolute;
                left: 10px;
                bottom: 10px;
                p   {
                    line-height: 18px;
                    margin: 0;
                    font-family: Neuzit Heavy;
                    font-size: 18px;
                    color: white;
                    text-decoration: none;
                    }
                }
            }


div.wall-entry:hover img    {
                            opacity:1;
                            filter:alpha(opacity=100); /* For IE8 and earlier */                    
                            }

a div.wall-entry {text-decoration: none;}

快速说明:我测试过{text-decoration:none;},这确实有效.但是,我不想改变一切.只是这个特定情况下的链接.

解决方法

将font-family放在包含多个单词的字体的引号中,首先:

font-family:“Neuzit Heavy”,sans-serif;

然后在一个put .wall-entry下面a:hover {text-decoration:none; }

您已切换订单.您要定位的项目应该在右侧.例如,

.wrapper .header a in english表示“定位.header内部的所有锚链接,位于.wrapper内”

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读