这里的第一个网站(只是一个抬头)!我的问题是我试图将我的内容(下面的飞鱼绘画和维护服务链接)全部放在h1类别而不移动图像!当我添加Services href链接时,我真的希望两个图像(左侧和右侧)分别保持在左上角和右上角.有任何想法吗?这是我的代码:
.round1 {
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
width: 70px;
height: 70px;
}
.round2 {
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
width: 70px;
height: 70px;
}
.linkto {
color: white;
font-size: 60%;
font-family: Arial;
}
.linkto:hover {
color: blue;
}
body {
padding: 20px 20px 20px 20px;
}
h1 {
color: white;
border: 6px solid black;
border-radius: 25px;
text-align: center;
font-family: Forte;
font-weight: bold;
background-color: black;
font-size: 180%;
padding-bottom: -50px;
}Run Code Online (Sandbox Code Playgroud)
<h1>
Flying Fish Painting & Maintenance</br>
<img class="round1" src="https://flyingfishpainting.files.wordpress.com/2013/04/flying_fish_logo_hressmall.png?w=300&h=291" align=left>
<img class="round2" src="https://flyingfishpainting.files.wordpress.com/2013/04/flying_fish_logo_hressmall.png?w=300&h=291" align=right>
<a class="linkto" href="C:\Users\CE User\Desktop\services.html">Services</a>
</h1>Run Code Online (Sandbox Code Playgroud)
我希望这有帮助。
.linkto {
color: white;
font-size: 60%;
font-family: Arial;
}
.linkto:hover {
color: blue;
}
body {
padding: 20px 20px 20px 20px;
}
h1 {
color: white;
border: 6px solid black;
border-radius: 25px;
text-align: center;
font-family: Forte;
font-weight: bold;
background-color: black;
font-size: 180%;
position: relative;
}
h1:before {
position: absolute;
content: url('https://flyingfishpainting.files.wordpress.com/2013/04/flying_fish_logo_hressmall.png?w=50,h=50');
left: 0;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
width: 70px;
height: 70px;
background-color: black;
}
h1:after {
position: absolute;
content: url('https://flyingfishpainting.files.wordpress.com/2013/04/flying_fish_logo_hressmall.png?w=50,h=50');
right: 0;
top: 0;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
width: 70px;
height: 70px;
background-color: black;
}Run Code Online (Sandbox Code Playgroud)
<h1>
Flying Fish Painting & Maintenance <br/>
<a class="linkto" href="C:\Users\CEUser\Desktop\services.html">Services</a>
</h1>Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
56 次 |
| 最近记录: |