2012-08-12 70 views

回答

43

你只需要CSS

.carousel .carousel-control { visibility: hidden; } 
.carousel:hover .carousel-control { visibility: visible; } 

Demo (jsfiddle)

+0

哇。很酷的答案。我認爲它必須用JQuery來完成,但顯然不是! – Muhambi 2012-08-12 20:37:42

-1

它也好看一點點擺脫那些討厭的梯度,從而增加這個也做的:

.carousel-control.left, .carousel-control.right { 
    background: none !important; 
    filter: progid: none !important; 
    outline: 0; 
} 
.carousel .carousel-control { 
    visibility: hidden; 
} 
.carousel:hover .carousel-control { 
    visibility: visible; 
} 
+0

這不是問題的答案 – alwe 2016-08-03 13:59:53