Html 如何设置a<;按钮>;和编码问题
我想知道是否有人能帮我完成我想完成的事情。我正在尝试将此Html 如何设置a<;按钮>;和编码问题,html,css,Html,Css,我想知道是否有人能帮我完成我想完成的事情。我正在尝试将此置于中心位置 这是我的名片 下面是我的HTML/CSS编码 <button class="button" href="#">Contact Us</button> .button { display:inline-block; border-radius:4px; background-color:#f4511e; border:none; color:#FFFFFF; text-alig
置于中心位置
这是我的名片
下面是我的HTML/CSS编码
<button class="button" href="#">Contact Us</button>
.button {
display:inline-block;
border-radius:4px;
background-color:#f4511e;
border:none;
color:#FFFFFF;
text-align:center;
font-size:18px;
padding:10px;
width:125px;
transition:all 0.5s;
cursor:pointer;
}
联系我们
.按钮{
显示:内联块;
边界半径:4px;
背景色:#F451E;
边界:无;
颜色:#FFFFFF;
文本对齐:居中;
字号:18px;
填充:10px;
宽度:125px;
过渡:均为0.5s;
光标:指针;
}
再说,我的箭到哪里去了?页面上的箭头不是我想要的。这是我输入代码笔的代码,但箭头没有显示。当前显示在我的代码笔上的箭头是否会被阻止?javascript编码是否仍然适用于新箭头
下面是我想要显示的箭头的HTML/CSS编码。(如果箭头的颜色是问题所在,我尝试更改它,但仍然无法看到。)
#箭{
高度:50px;
宽度:112px;
颜色:白色;
边界顶部:无;
左边界:无;
利润率:100像素;
字号:74pt;
变换:旋转(63度)旋转(90度);
}`
亲切问候,
利亚姆。你想把按钮居中吗?如果是,可以通过将以下内容添加到.button CSS配置中来实现:
.button {
position: relative;
top: 50%;
left: 50%;
}
我假设您希望将
按钮居中,因此如果您更新其规则,它将
.button {
display:block; /* changed */
margin: 0 auto; /* added */
border-radius:4px;
background-color:#f4511e;
border:none;
color:#FFFFFF;
font-size:18px;
padding:10px;
width:125px;
transition:all 0.5s;
cursor:pointer;
}
如果你给它一个边框,箭头就会显示出来,就像这样
#arrow {
height: 50px;
width: 112px;
color: white;
border: 2px solid red; /* added */
border-top: none;
border-left: none;
margin: 100px;
font-size: 74pt;
transform: rotate(63deg); /* changed */
}
嗨,谢谢你的帮助!我不知道怎么做,你能帮我个忙吗?你看到白色的正方形了吗?你能用红色的箭头代替它吗,就是那个位置?javascript还会使用它吗?@LiamDocherty如下:。。。我将#arrow
css代码移动到.next
规则,并从标记中删除#arrow
div
.button {
display:block; /* changed */
margin: 0 auto; /* added */
border-radius:4px;
background-color:#f4511e;
border:none;
color:#FFFFFF;
font-size:18px;
padding:10px;
width:125px;
transition:all 0.5s;
cursor:pointer;
}
#arrow {
height: 50px;
width: 112px;
color: white;
border: 2px solid red; /* added */
border-top: none;
border-left: none;
margin: 100px;
font-size: 74pt;
transform: rotate(63deg); /* changed */
}