放置图像很难 [英] Hard time placing an image

查看:70
本文介绍了放置图像很难的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在页面中有图片时遇到了一些麻烦。我已经尝试了图像在文本中的位置以及它将在哪里居中,似乎没有任何工作。



我尝试了什么:



I am having some trouble with having an image in my page. I have tried where the image would go in the text and where it would just be centerd, and nothing seems to be working.

What I have tried:

Could you tell me if this code is wrote right and what might be my problem.

<img src="pix/gosling.png" alt="gosling" style="float:left;width:25%;">

also tried this code,

<p style="text-align: center;">
<img src="pix/daisy.png" alt="Daisy">
<br>
A beautiful daisy
</p>


I put this right under the <p> code as it was in the chapters and I cant seem to find out why the image wont come up. It comes up with the blue ?mark.

Not sure what I am doing wrong.

推荐答案

这是如何:

This is how:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Untitled Page</title>
    <style type="text/css">
        .style1 {
            width: 72000px;
            height: 96000px;
        }
    </style>
</head>
<body>

    <p>
        <img alt="beautiful daisy" class="style1" 
            src="file:///C:/Users/Administrator/pix/daisy.jpg" /></p>

</body>
</html>





启动VSStudio,打开一个新的.html页面,将图像放入设计空间,在提示时添加注释...



Fire up VSStudio, open a new .html page, drop your image into the design space, add note when prompted ...


这篇关于放置图像很难的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆