Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html <;a href=";window.open(…)”&燃气轮机;不起作用_Html_Css_Hyperlink - Fatal编程技术网

Html <;a href=";window.open(…)”&燃气轮机;不起作用

Html <;a href=";window.open(…)”&燃气轮机;不起作用,html,css,hyperlink,Html,Css,Hyperlink,我有两段文字,一段左右对齐。右边的文本工作正常,链接到正确的页面,但是左边的链接不工作。它们甚至不显示为链接。该网站位于此处-(注:只能通过链接访问,无法在网站导航中找到) 下面是使用的代码 <div class="VideoText" align="left"> <a href=""><span> <strong> Credits </strong> </span></a> <br>

我有两段文字,一段左右对齐。右边的文本工作正常,链接到正确的页面,但是左边的链接不工作。它们甚至不显示为链接。该网站位于此处-(注:只能通过链接访问,无法在网站导航中找到)

下面是使用的代码

<div class="VideoText" align="left">
    <a href=""><span> <strong> Credits </strong> </span></a> <br>                    
    Directed By: <a href="http://www.kingdombrand.com/Film/Alek/Portfolio"> Link One </a> <br>
    Edited By:   <a href="http://www.kingdombrand.com/Film/Jess/Portfolio"> Link Two </a>
    <br>                                 
    <br>                           
</div>

<!-- S H A R E-->
<div class="VideoShare" align="right">
    <b> Share </b> <br>
    <a href="http://www.twitter.com/share">Twitter</a><br>
    <a href="#" onclick=" window.open(
      'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href), 
      'facebook-share-dialog', 
      'width=626,height=436'); 
       return false;">
       Facebook
    </a>
    <br>
</div>

这些链接确实有效,它们只包含在您的
div.VideoShare
中。放置
显示:无,然后将鼠标悬停在链接上以检查它们

我不能帮你找到一个可靠的CSS解决方案。就我个人而言,我喜欢
浮动:右
(或
显示:内联块
)视频共享按钮,这样它们包含的
div
就不会100%水平伸展。不过可能有更好的解决方案。

试试这个

.VideoText {
   position: absolute;
    left: 100px;
    top:  475px;
    overflow:visible
}

.VideoShare {
   position: absolute;
    Left: 300px;
    width:67.5%;
    top:  475px;
    overflow:visible
}

Put
z-index:1

.VideoText {
}
这似乎是个问题,只需为两者添加一个z索引:

.VideoText {
    position: absolute;
    left: 200px;
    top:  475px;
    overflow:visible;
    z-index: 2;
}

.VideoShare {
    position: absolute;
    Left: 200px;
    width:67.5%;
    top:  475px;
    overflow:visible;
    z-index: 1;
}
发件人:

z-index属性指定元素及其子元素的z顺序 后代。当元素重叠时,z顺序确定哪一个元素 覆盖另一个。具有较大z索引的元素通常覆盖 元素与较低的元素


你的
.VideoShare
div覆盖你的链接。尝试删除宽度,并将div放置在右侧而不是左侧。因为你需要它在右边

.VideoShare {
  ...
  /* left: 200px; */
  right: 200px;
  /* width: 67.5%; */
  ...
}

解决方案非常简单)左侧的链接是正确的,但被您的div class=“VideoShare”覆盖。例如,对于class=“VideoShare”,您可以尝试将left:200px改为left:400px,并希望您能理解我的意思,正如我在上面的评论中所说,您的两个容器刚好重叠。您可以使两个容器的宽度相同,并使用绝对定位将右侧容器移动到右侧

.VideoShare {
    left: auto;
    top: 475px;
    width: 200px;
    right: 200px;
    position: absolute;
}

看起来您的一个容器位于另一个容器之上。它们只是重叠,这就是链接只能在其中一个上访问的原因。
.VideoShare {
    left: auto;
    top: 475px;
    width: 200px;
    right: 200px;
    position: absolute;
}