私はボーダー上のボーダーの色をランダムに設定するこのスクリプトを持っていますが、imgを残すと基本ボーダーも削除されます。私はこの境界線をそのままそこにとどめて、削除しないようにしたい)ホバー上でボーダーカラーをランダムに設定する
script>
$(function() {
var colors = ["#FC3E6B","#24FF00","#0087F9","#F9F900"];
$('.grid-item-content').hover(
function() {
var rand = Math.floor(Math.random()*colors.length);
$(this).css('border-style', 'solid');
$(this).css('border-width', '10px');
$(this).css('border-color', colors[rand]);
},
function() {
$(this).css('border-style', 'none');
}
);
});
</script>
パーフェクトおかげでチームメイト! –