Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/15.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 如何将图片添加到css代码中(我想它需要边框)_Html_Css - Fatal编程技术网

Html 如何将图片添加到css代码中(我想它需要边框)

Html 如何将图片添加到css代码中(我想它需要边框),html,css,Html,Css,我一直在学习html和css,我想添加一个图像和一个文本,当页面移动时,它们会移动 这就是我所做的 p1{ color: black; font-family: courier; } #p2{ color:black; font-family:courier; } .a{ color:yellow; font-family:courier; font-size: 30px; background-color: black;

我一直在学习html和css,我想添加一个图像和一个文本,当页面移动时,它们会移动 这就是我所做的

p1{
    color: black;
    font-family: courier; }
#p2{
    color:black;
    font-family:courier; } .a{
    color:yellow;
    font-family:courier;
    font-size: 30px;
    background-color: black;
    margin: 10px auto ;
    margin-right: 200px;
    margin-left: 200px;
    margin-bottom: 200px;
    text-align: center;
    padding: 20px;
    padding-left: 30px;
    border: 10px groove lightgreen; } body{
    background-color: cyan; } img{ margin-left:200px; }
下面是html代码

<DOCTYPE html>
<html>
    <head>
        <link rel = 'stylesheet' type = 'text/css' href = 'kol.css'/>
    </head>
    <body>
        <p id = p1>
        this is paragraph.

        </p>
        <p id = p2>
        paragraph2
        </p>
        <p class = 'a'>
        this is cool
        </p>
    </body>
</html>

这是一段。

第2段

这很酷


我认为您的帖子被“剪切”,您能重新编辑并添加一些上下文吗?欢迎来到StackOverflow!为了让我们更好地帮助您,请更新您的问题,使其在问题本身的a中显示所有相关代码,而不是简单地链接到网站。该网站可能是恶意的,被过滤系统阻止,或稍后被删除。让我们知道您迄今为止为解决您的问题所做的努力也是很有帮助的。有关更多信息,请参阅有关的帮助文章。只需在“代码示例”部分插入代码的重要部分,我们将不会下载您的文件。花