add_css.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. $('#ifame').css({
  2. backgroundImage:'url(https://www.gitinn.com/pan-chinese/_blogs/raw/master/img/'+parseInt(Math.random()*11+1)+'.png)',
  3. })
  4. $('input[placeholder="请输入内容"]').attr('id','search').attr('autocomplete','off');
  5. setTimeout(function () {
  6. $('#search').focus(function(){
  7. $(this).attr('placeholder','')
  8. }).blur(function () {
  9. $(this).attr('placeholder','请输入内容')
  10. });
  11. },300)
  12. $('.Body_val>h1').text('').text('欢迎来到Hopeの我的blog');
  13. $('head').after(`
  14. <style>
  15. body{
  16. overflow: hidden;
  17. }
  18. #search::-webkit-input-placeholder{
  19. color: #999;
  20. }
  21. #ifame{
  22. position: absolute;
  23. min-width: 1200px;
  24. width: 100%;
  25. height: 100%;
  26. background-color: transparent;
  27. background-size: cover;
  28. background-position: center center;
  29. background-repeat: no-repeat;
  30. overflow-y:scroll;
  31. overflow-x:hidden;
  32. }
  33. #ifame::-webkit-scrollbar{
  34. width: 5px;
  35. height: 8px;
  36. }
  37. #ifame::-webkit-scrollbar-button{
  38. width: 0px;
  39. height: 0px;
  40. }
  41. #ifame::-webkit-scrollbar-thumb{
  42. width: 5px;
  43. height: 8px;
  44. background-color: rgb(53, 185, 149);
  45. }
  46. </style>
  47. `)