0

im struggling how to position a <div> on top of a video <object>.

the blue border is my <iframe>. behind the video is my <div class="title">some text</div> that i wanted to be on top of the video and position it at the bottom right.

enter image description here

CSS and HTML

<style type="text/css">
.title {
    height:50px;
    width:150px; 
    border:1px solid #000;
    position:absolute;
    z-index:10;
    background-color:pink;
    top:260px;left:0;
}
iframe {
    width:490px;
    height:400px;
    position:absolute;
    z-index:1;
    border:2px solid blue;
}
</style>
<body>
<div id="wrap" style="position:relative;">
    <div class="title">
        <h1>some text</h1>
    </div>

<iframe src="owlvid.html"></iframe>
</div>
</body>

this is the object inside my owlvid.html

<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
   codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
    width="480" height="300" id="vlc" events="True">

   <param name="Src" value="owl-vid-path-source" />
   <param name="ShowDisplay" value="True" />
   <param name="AutoLoop" value="False" />
   <param name="AutoPlay" value="True" />
   <param name="wmode" value="transparent" />

   <embed id="vlcEmb"  type="application/x-google-vlc-plugin" version="VideoLAN.VLCPlugin.2" autoplay="yes" loop="no" width="480" height="300"
     target="owl-vid-path-source" ></embed>

</OBJECT>

Your last query, ?- member('Course',relation2(relation(X,_))) isn't succeeding because the second argument of member is a predicate rather than a list. To get a clear understanding of what's going on, you can write a predicate in your file like this:

test('Course', relation2(relation(X,_)).

and then query test/2 with free variables, ?- test(X,Y), and observe the values of X and Y. That's those values are exactly what member/2 is getting, but it is only defined to tell us things about lists.

In order to pass the list in the first argument of relation/2 to member/2, you have to first instantiate X by calling the predicate and then call member/2 with the instantiated X as an argument:

?- relation2(relation(X,_)), member('Course', X).

Note that the second argument of relation/2 is a list of lists, so in order to check for members therein, you'll have to use a list as your first argument of member/2, e.g.,

?- relation2(relation(_,X)), member([CourseName, _,_], X).

will be true if CourseName matches the first element of the lists.

4

1 回答 1

0

尝试这个:

<style type="text/css">
#wrap {
    position: absolute;
    width: 492px;
}
.title {
    background-color: #FFC0CB;
    border: 1px solid #000000;
    height: 50px;
    width: 100%;
}
.title h1 {
    float: right;
    line-height: 1;
    margin-right: 10px;
    margin-top: 0;
    position: relative;
    top: 25%;
}
iframe {
    border: 2px solid #0000FF;
    height: 400px;
    padding-top: 50px;
    position: absolute;
    top: 0;
    width: 490px;
}
</style>
<body>
  <div id="wrap">
    <div class="title">
      <h1>some text</h1>
    </div>
    <iframe src="owlvid.html"></iframe>
  </div>
</body>
于 2013-10-18T02:19:01.980 回答