现在,在布朗大学的 NLCC,我和我的导师正试图在 psiTurk Stroop 任务的底部添加图像;我们正在与项目的开发分支合作。
我们的目标是使一行三张图像显示如下:http: //i.stack.imgur.com/4IjNG.png
除了在右侧和左侧框中显示的红色和绿色框。但是,当我尝试包含代码以便将框显示在 test.html 页面的底部时,这就是我的浏览器中出现的内容。 http://i.stack.imgur.com/LKGfk.png
我尝试使用的代码如下:
h1>Test Phase</h1>
<div id="instructions">What color is this word?</div>
<div id="stim"></div>
<div id="query"></div>
<p id="PDisplay"> </p>
<p id="TDisplay"> </p>
<p id="RDisplay"> </p>
<div style = "position: absolute;
left:50;"><img id="Lred" src="static/images/red.jpg" IMG HEIGHT = 150/></div>
<div style = "position: absolute;
left:50;"><img id="Lblank" src="static/images/blank.jpg" IMG HEIGHT = 150/></div>
<div style = "position: absolute;
left:50;"><img id="Lgreen" src="static/images/green.jpg" IMG HEIGHT = 150/></div>
<div style = "position: absolute;
left:370;"><img id="Ccue" src="static/images/cue.jpg" IMG HEIGHT = 150/></div>
<div style = "position: absolute;
left:370;"><img id="Cblank" src="static/images/blank.jpg" IMG HEIGHT = 150/></div>
<div style = "position: absolute;
left:370;"><img id="Ctarget" src="static/images/target.jpg" IMG HEIGHT = 150/></div>
<div style = "position: absolute;
left:690;"><img id="Rred" src="static/images/red.jpg" IMG HEIGHT = 150/></div>
<div style = "position: absolute;
left:690;"><img id="Rblank" src="static/images/blank.jpg" IMG HEIGHT = 150/></div>
<div style = "position: absolute;
left:690;"><img id="Rgreen" src="static/images/green.jpg" IMG HEIGHT = 150/></div>
我认为可能有一个元素推动图像仅显示在左角。为了解决这个问题,我尝试操作页面的 css,但我删除了整个工作表,除了 body 的 CSS,所有图像仍然显示在左侧。以防万一,这是css的样子:
@import url(http://fonts.googleapis.com/css?family=Crimson+Text:400,600italic);
body {
/* background: #999; */
background: black; /* #808090; */
color: white;
text-align: center;
font-family: Verdana, Helvetica, sans-serif;
margin: 0 auto;
margin-top: 100px;
width: 800px;
}
h1 {
font-family: "Crimson Text";
font-size: 42pt;
font-style: italic;
}
a {
color: #FFCC90;
}
.warm {
color: #DDAA90;
}
.cool {
color: #ccccff;
}
strong {
font-weight: bold;
color: #DDAA90;
}
/* Instructions */
#main {
margin: 0 auto;
width: 800px;
font-size: 100%;
}
.continue {
font-size: 2em;
width: 5em;
height: 2.5em;
margin: 20px 20px;
}
.instruct p {
text-align: justify;
}
.instruct .prompt {
text-align: center;
font-style: italic;
font-size: 100%;
margin: 0 auto;
margin-top: 30px;
width: 500px;
}
/* Questionnaire */
input {
width: 200px;
height: 50px;
font-size: 22pt;
}
.questionnaire {
text-align: center;
}
.questionnaire .continue {
margin: 0 auto;
margin-top: 20px;
}
.questionnaire h1 {
text-align: center;
}
.questionnaire p {
text-align: left;
}
.questionnaire #warning {
color: red;
font-weight: bold;
}
.questionnaire table {
margin: 0 auto;
/* Border stuff: */
table-layout: fixed;
border-collapse: separate;
border-spacing: 0.25em;
border: none;
}
.questionnaire tr {
display: block;
border-bottom: 1px dashed white;
}
.questionnaire tr:last-child { border: 0; }
.questionnaire td {
padding-right: 0.25em;
vertical-align: middle;
border-width: 0 1px;
border: none
margin: 20px;
padding-bottom: 10px;
}
.questionnaire td:first-child, td + td {border-left: 0; }
.questionnaire td:last-child { padding-right: 0; border-right: 0; }
.answer {
text-align: left;
padding-left: 3em;
}
.questionnaire .questiontext {
vertical-align: top;
width: 300px;
margin: 20px;
font-size: 1.2em;
}
.questiontext em {
font-size: 70%;
}
.questionnaire textarea {
width: 320px;
height: 130px;
}
.questionnaire form {
text-align: right;
}
.questionnaire ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.questiontext {
text-align: right;
}
/* Debriefing form */
#debriefing {
width: 640px;
margin: 0 auto;
}
#debriefingtext {
margin: 0 auto;
padding: 10px 20px;
font-size: 90%;
text-align: justify;
}
#affirmationbox {
position: relative;
margin: 0 auto;
border: 1px dotted white;
padding: 10px 20px;
vertical-align: middle;
}
#affirmationbox p {
text-align: left;
font-style: italic;
}
#affirmationbox table {
border-spacing: 20px;
}
#affirmationbox td {
vertical-align: middle;
font-size: 100%;
color: black;
height: 50px;
cursor: pointer;
}
#affirmative {
background: white;
overflow: hidden;
font-weight: bold;
width: 10em;
}
#negative {
background: white;
font-size: 100%;
width: 25em;
}
我想知道 HTML 中是否还有其他元素或代码的其他属性限制了图像的放置。