小编use*_*157的帖子

CSS 1px边框描边围绕边界半径

这是为web dev.在圆形或具有非常圆角的方形上使用1px边框半径时,笔划开始中断.如果我们将它改为2px,那么我们添加的px越多越好.但有没有办法用1px中风解决这个问题?

background: rgba(32, 32, 32, .9);
height: 30px;
width: 30px;
border: 1px solid white;
border-radius: 20px;
:hover {
 height: 300px;
 width: 200px;
}
Run Code Online (Sandbox Code Playgroud)

附图像!

在此输入图像描述

html css html5 css3 web

18
推荐指数
2
解决办法
1万
查看次数

CSS悬停文本用按钮改变颜色

因此,为元素设置悬停效果非常简单.但我想要的是当用户将鼠标悬停在其中包含文本的按钮上时,使按钮从黑色变为白色,同时将文本从白色变为黑色.而不是两个单独的元素.我该怎么做?

谢谢!

#signUpBox {
    width: 150px;
    height: 47px;
    border-style: solid;
    border-width: 1px;
    margin: auto;
    margin-top: 25px;
    border-radius: 2px;
}

#signUpBox:hover {
    background-color: #ffffff;
}

h3 {
    text-align: center;
    margin-top: -35px;
    letter-spacing: 1px;
    font-size: 17px;
}
Run Code Online (Sandbox Code Playgroud)

html css html5 css3

4
推荐指数
1
解决办法
2万
查看次数

对象不响应位置:相对

我想要一个方形按钮,以便在浏览器缩小时响应,但它不会移动.有什么问题?谢谢您的帮助!

<div class="firstSection">
        <div class="menuBox"></div>

.firstSection {
    background-image: url(/Users/omaramin/Documents/Competition/project/mainBanner.png);
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    top:-144px;
    width: 100%;
    height: 100%;
    font-family: Bariol;
    color: #ffffff;
}

.menuBox {
    position: relative;
    margin-left: 200px;
    margin-top: 200px;  
    width: 35px;
    height: 35px;
    border-style: solid;
    border-width: 1px;
    border-radius: 2px;
}
Run Code Online (Sandbox Code Playgroud)

html css html5 css3

0
推荐指数
1
解决办法
4936
查看次数

标签 统计

css ×3

css3 ×3

html ×3

html5 ×3

web ×1