Html 如何调整列表样式图像的大小?
只是通过重新创建tumblr网站进行一些练习,我对右侧的“推荐博客”有一些问题。我想实现使用一个小用户图标徽标,而不是列表样式的项目符号。是否可以在css中调整图像大小?或者我必须在photoshop中调整图像大小吗? 看看 HTMLHtml 如何调整列表样式图像的大小?,html,css,html-lists,photoshop,Html,Css,Html Lists,Photoshop,只是通过重新创建tumblr网站进行一些练习,我对右侧的“推荐博客”有一些问题。我想实现使用一个小用户图标徽标,而不是列表样式的项目符号。是否可以在css中调整图像大小?或者我必须在photoshop中调整图像大小吗? 看看 HTML #navi{ 列表样式类型:无; } #navi>li::在{ 内容:''; 显示:内联块; 高度:40px; 宽度:40px; 背景尺寸:40px; 背景图像:url('https://78.media.tumblr.com/avatar_0f16d6a6a0
#navi{
列表样式类型:无;
}
#navi>li::在{
内容:'';
显示:内联块;
高度:40px;
宽度:40px;
背景尺寸:40px;
背景图像:url('https://78.media.tumblr.com/avatar_0f16d6a6a019_128.pnj');
背景重复:无重复;
右边距:10px;
背景位置:中心;
垂直对齐:中间对齐;
}
#navi{
列表样式类型:无;
}
#navi>li::在{
内容:'';
显示:内联块;
高度:40px;
宽度:40px;
背景尺寸:40px;
背景图像:url('https://78.media.tumblr.com/avatar_0f16d6a6a019_128.pnj');
背景重复:无重复;
右边距:10px;
背景位置:中心;
垂直对齐:中间对齐;
}
我不会使用列表样式图像
在这种情况下,使用伪元素会更容易。我不认为可以缩放列表样式图像
我不会使用列表样式图像
在这种情况下,使用伪元素会更容易。我认为不可能缩放列表样式的图像
<html>
<head>
<title>Tumblr</title>
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
<link rel="stylesheet" type="text/css" href="tumblrstyle.css">
</head>
<body>
<!-- Header Navigation -->
<div class="top-head">
<header>
<div id="top-head-left">
<h1>T</h1>
<input type="text" name="" placeholder="">
<i class="fas fa-search"></i>
</div>
<div id="top-head-right">
<a href="#"><i class="fas fa-home fa-2x"></i></a>
<a href="#"><i class="far fa-compass fa-2x"></i></a>
<a href="#"><i class="fas fa-envelope fa-2x"></i></a>
<a href="#"><i class="far fa-comment fa-2x"></i></a>
<a href="#"><i class="fas fa-bolt fa-2x"></i></a>
<a href="#"><i class="fas fa-user fa-2x"></i></a>
</div>
</header>
</div>
<!-- End Header -->
<!-- RightBar -->
<div class="container">
<div class="right-side">
<div class="right-side nav">
<h3>Recommended Blogs</h3>
<ul id="navi">
<li>empty</li>
<li>empty</li>
<li>empty</li>
<li>empty</li>
</ul>
</div>
<div class="radar">
<h3>radar</h3>
<ul>
<li>empty</li>
<p>
</p>
</ul>
</div>
</div>
<!-- Post Controls -->
<div class="controller">
<a href="#"><img src="https://image.freepik.com/free-vector/abstract-summer-sun-logo- design_1436-184.jpg"></a>
<div class="post-group">
<div class="icons">
<a href="#"><i class="fas fa-home fa-5x"></i></a>
</div>
<div class="icons">
<a href="#"><i class="far fa-compass fa-5x"></i></a>
</div>
<div class="icons">
<a href="#"><i class="fas fa-envelope fa-5x"></i></a>
</div>
<div class="icons">
<a href="#"><i class="far fa-comment fa-5x"></i></a>
</div>
<div class="icons">
<a href="#"><i class="fas fa-bolt fa-5x"></i></a>
</div>
<div class="icons">
<a href="#"><i class="fas fa-user fa-5x"></i></a>
</div>
</div>
</div>
</body>
</html>
/*Reset*/
* {
margin: 0;
padding: 0;
}
body {
background: lightgray;
}
header {
padding: 0 10px;
}
header h1 {
display: inline;
margin-right: 15px;
}
.container {
width: 60%;
margin: auto;
overflow: visible;
}
div h3 {
border-bottom: 1px solid black;
}
/*Header*/
.top-head {
background: lightblue;
height: 60px;
border-bottom: 5px solid black;
padding: 0px 20px;
}
#top-head-left {
float: left;
padding-top: 5px;
}
#top-head-left input[type="text"] {
width: 200px;
background: yellow;
padding: 5px 0px;
}
#top-head-right {
float: right;
padding-top: 12px;
}
/*RightsideBar*/
.right-side {
float: right;
}
.nav ul {
list-style-image: url('https://78.media.tumblr.com/avatar_0f16d6a6a019_128.pnj');
}
.nav ul li {
}
.radar ul {
list-style: none;
}
/*Post Controller*/
.controller {
margin-top: 50px;
}
.controller img {
width: 10%;
float: left;
margin-right: 20px;
border-radius: 10px;
}
.post-group {
float: left;
background: white;
height: 68px;
border-radius: 10px;
padding-top: 8px;
padding-bottom: 22px;
}
.icons {
float: left;
}
.icons a {
color: orange;
padding: 0 12px;
}
/* https://78.media.tumblr.com/avatar_3aed9115be2f_128.pnj
https://78.media.tumblr.com/avatar_0f16d6a6a019_128.pnj
https://78.media.tumblr.com/avatar_0f16d6a6a019_128.pnj
https://78.media.tumblr.com/avatar_996dede0302e_128.pnj */