gpt4 book ai didi

html - 为什么我不能在登录和注册代码中更改个人资料图片的大小?

转载 作者:行者123 更新时间:2023-11-28 07:29:43 27 4
gpt4 key购买 nike

所以我一直在编写登录/注册表单的代码。我不知道为什么 profile-img 没有改变它的高度或宽度!

这是我的 CSS:

.form-signin
{
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
.form-signin .form-signin-heading, .form-signin .checkbox
{
margin-bottom: 10px;
}
.form-signin .checkbox
{
font-weight: normal;
}
.form-signin .form-control
{
position: relative;
font-size: 16px;
height: auto;
padding: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.form-signin .form-control:focus
{
z-index: 2;
}
.form-signin input[type="text"]
{
margin-bottom: -1px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.form-signin input[type="password"]
{
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.account-wall
{
margin-top: 20px;
padding: 40px 0px 20px 0px;
background-color: #f7f7f7;
-moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
}
.login-title
{
color: #555;
font-size: 18px;
font-weight: 400;
display: block;
}
.profile-img
{
width: 96px;
height: 96px;
margin: 0 auto 10px;
display: block;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
}
.need-help
{
margin-top: 10px;
}
.new-account
{
display: block;
margin-top: 10px;
}

这是我的 HTML:

<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<center>
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-4 col-md-offset-4">
<font face="Arial Narrow"><h1 class="text-center login-title">Hello</h1>
<div class="account-wall">
<img class="profile-img" src="butterfly.jpg"
alt="">
<form class="form-signin" method="POST" action="">
<div class="about"><font face="Arial Narrow"><input type="text" class="form-control" name="username" placeholder="Username" required autofocus></div></font>
<div class="about"><font face="Arial Narrow"><input type="password" class="form-control" name="password" placeholder="Password" required></div></font>
<div class="about"><button class="btn btn-lg btn-primary btn-block" type="submit">
<font face="Arial Narrow">Sign in</button></div></font>
<br>
<div class="about">
<label class="checkbox">
<input type="checkbox" value="remember-me">
<font face="Arial Narrow">Remember me</font>
</label>
</div>
</form>
</div>
<a href="MokhaSIGNUP.php" class="text-center new-account about"> <font color="black">Become a member! Click here!</font> </a></font>
</div>
</div>
</div>
</center>
</body>

我不知道我做错了什么。当我添加高度和宽度并更改数字时,它保持不变。

我该怎么办?无论我更改多少次高度和宽度,它都不会改变。即使我删除了图片,结果也是一样的。尺寸相同,但错误提示没有可用图像。我错过了什么?我会展示它的外观图像,但我没有足够的声誉。

最佳答案

它对我有用,这是 fiddle https://jsfiddle.net/049Lj4LL/8/

我将尺寸从 96x96 更改为 200x200

.profile-img
{
width: 200px;
height: 200px;
margin: 0 auto 10px;
display: block;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
}

关于html - 为什么我不能在登录和注册代码中更改个人资料图片的大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31599763/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com