我正在为网站构建这个新的HTML/CSS设计,但我只允许触摸CSS文件。三角在右侧div悬停
我需要一个div来获得在右端上的三角形过这样的:
这是当前的代码:
.slider_button_out{
cursor:pointer;
height:49px;
width:174px;
margin-bottom: 1px;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.5, #0C4B9D),color-stop(1, #023C7F));
background-image: -o-linear-gradient(bottom, #0C4B9D 50%, #023C7F 100%);
background-image: -moz-linear-gradient(bottom, #0C4B9D 50%, #023C7F 100%);
background-image: -webkit-linear-gradient(bottom, #0C4B9D 50%, #023C7F 100%);
background-image: -ms-linear-gradient(bottom, #0C4B9D 50%, #023C7F 100%);
background-image: linear-gradient(to bottom, #0C4B9D 50%, #023C7F 100%);
}
/*the div down here is the div that displays on hover */
.slider_button_over{
display:block;
cursor:pointer;
background-image: none;
height:49px;
width:174px;
margin-bottom: 1px;
background-color: #ed1c24;
}
请注意,我只能碰CSS,所以我不能添加div或其他东西。
使用这个CSS三角形生成器并将其应用到年底你的div http://apps.eky.hk/css-triangle-generator/ – SaturnsEye
@Adsy谢谢,但我怎么才能把它应用到最后?当我不能添加一个新的div到HTML? –