pull/216/head
BingoKingo 2020-04-03 21:38:25 +08:00 committed by GitHub
parent 0221188a39
commit 55cb9a7200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 15 deletions

View File

@ -57,21 +57,9 @@
</style> </style>
</head> </head>
<body> <body>
<script> echo '<script language="javascript">';
window.onload=function(){ echo 'window.onload=function(){var colorList=["#a9ddccbd","#ff6867bd","#809b9cbd","#00cccbbd","#bcbdc1bd","#f6c500bd","#767386bd","#4cda64bd"];var div=document.getElementsByClassName("list-header-container");for(var i=0;i<div.length;i++){var bgColor=getColorByRandom(colorList);div[i].style.background=bgColor}function getColorByRandom(colorList){var colorIndex=Math.floor(Math.random()*colorList.length);var color=colorList[colorIndex];colorList.splice(colorIndex,1);return color}};';
var colorList = ['#a9ddccbd','#ff6867bd','#809b9cbd','#00cccbbd','#bcbdc1bd','#f6c500bd','#767386bd','#4cda64bd']; echo '</script>';
var div = document.getElementsByClassName('list-header-container');
for(var i=0;i<div.length;i++){
var bgColor = getColorByRandom(colorList);
div[i].style.background=bgColor;
}
function getColorByRandom(colorList){
var colorIndex = Math.floor(Math.random()*colorList.length);
var color = colorList[colorIndex];
colorList.splice(colorIndex,1);
return color;
}
}
</script> </script>
<div style="padding:1px"> <div style="padding:1px">
<?php <?php