框架以及如何添加它们

问题描述 投票:0回答:1

嗨,我对这一切还算陌生……我正在重新熟悉它。但无论如何,我有一个问题。是否可以使用图像作为框架并能够在该框架内书写?我希望框架我的整个页面并能够在其中书写。或者甚至可能在其中添加较小的图像

<!DOCTYPE html>
 <html lang="en">
 <head>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="utf-8">
<meta name="generator" content="CoffeeCup HTML Editor (www.coffeecup.com)">
<meta name="dcterms.created" content="Sun, 01 Oct 2023 16:14:14 GMT">
<meta name="description" content="">
<meta name="keywords" content="">
    <title>index</title>

   <style type="text/css">
    <!--
    body {
        background-color:#FFFFFF;
     background-image:url('pngegg (3).png');
    background-position:center center;
      background-repeat:no-repeat;
   }
    a  { color:#0000FF; }
    a:visited { color:#800080; }
      a:hover { color:#008000; }
     a:active { color:#FF0000; }
-->
   </style>
   <!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
<![endif]-->
html frames
1个回答
0
投票

是的,你可以,使用图像作为背景

<div class="frame-container">
    <div class="content">
        <h1>Welcome to My Page</h1>
        <p>This is some content inside the frame.</p>
        <img src="path_to_some_image.jpg" alt="An example nested image">
    </div>
</div>

.frame-container {
    background-image: url('pngegg (3).png');
    background-position: center center;
    background-repeat: no-repeat;
    /* Assuming the image's dimensions are 500px by 500px for example. Adjust these values according to your image size. */
    width: 500px;
    height: 500px;
    margin: auto; /* Centering the frame on the page */
    padding: 20px; /* To ensure content doesn't touch the frame edges */
}

.content {
    /* Additional styles for the inner content can go here */
}

a {
    color: #0000FF;
}

a:visited {
    color: #800080;
}

a:hover {
    color: #008000;
}

a:active {
    color: #FF0000;
}
© www.soinside.com 2019 - 2024. All rights reserved.