添加指向Font Awesome图标的链接

时间:2017-11-01 11:20:01

标签: html hyperlink font-awesome

字体真棒图标上的链接无法在以下容器中运行。

<div class="profile_wrap">
  <div class="profile_tile">
    <img class="pp-image" src="http://maduk.uk.w3pcloud.com/wp-content/uploads/2017/10/stuart-pic.png">
    <div class="social_area profile_animate-text">
      <a href="http://www.gmail.com" class="icon-block"><i class="fa fa-envelope"></i></a>
      <a href="http://www.linkedin.co.uk"><i class="fa fa-linkedin"></i></a>
    </div>
    <div class="profile_text">
      <h1 class="profile_animate-text">Lorem ipsum.</h1>
      <h2 class="profile_animate-text">More lorem ipsum bacon ipsum.</h2>
      <p class="profile_animate-text">Bacon ipsum dolor amet pork belly tri-tip turducken, pancetta bresaola pork chicken meatloaf. Flank sirloin strip steak prosciutto kevin turducken.</p>
    </div>
  </div>
</div>

我通过在元素上添加以下CSS z-index:999来修复此问题。

问题是因为他们坐在div的后面并且还有另一个字体div,这使他们无法点击。

1 个答案:

答案 0 :(得分:0)

试试这个:

trait SAccessor {
    type RV;
    fn new(Data) -> S;
    fn v2(&S) -> &Self::RV;
    fn v1_mut(&mut S) -> &mut Self::RV;
}

struct DirectSAccessor;

impl SAccessor for DirectSAccessor {
    type RV = Option<Data>;
    fn new(data: Data) -> S {
        S {
            v1: Some(data),
            v2: None
        }
    }
    fn v2(s: &S) -> &Self::RV {
        &s.v2
    }
    fn v1_mut(s: &mut S) -> &mut Self::RV {
        &mut s.v1
    }
}

fn update<A>(diffs: &mut HashMap<u64, S>, key: u64, data: Data) 
where A: SAccessor<RV=Option<Data>>
{
    match diffs.entry(key) {
        Entry::Vacant(v) => {
            let variant = A::new(data);
            v.insert(variant);
        },
        Entry::Occupied(e) => {
            let new_variant = Some(data);
            if A::v2(e.get()) == &new_variant {
                e.remove();
            } else {
                let existing = e.into_mut();
                *A::v1_mut(existing) = new_variant;
            }
        }
    }
}

// ...

// update::<DirectSAccessor>( ... );