Advertisement
Guest User

Anki CSS

a guest
Mar 21st, 2019
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. Here my CSS. Card layouts first.
  2. Notes: My cards have three fields, "Kanji" (Expression, I just named it kanji and never changed that), "Reading" and "Meaning". If your cards have less fields, you'll have to adjust the positioning of the fields by changing the value in margin. Always preview using browse, not the preview field (that's bugged, at least for me).
  3. The url(_truecross2.png) is replaced with the name of your background picture. You put that into your media folder (Appdata\Roaming\Anki2\your profile\collection.media). You need a _ in front of the name of the file so that it doesn't get deleted.
  4. The fonts are all default fonts in Windows, they should work fine. You can change the font by entering the name of the font behind "font-family".
  5.  
  6. ///FRONT OF CARD:///
  7.  
  8. <div class=box>
  9. <div class=kanji>{{Kanji}}</div>
  10.  
  11. ///BACK OF CARD:///
  12.  
  13. <div class=box>
  14. <div class=kanji-back>{{Kanji}}</div>
  15.  
  16.  
  17. <div class=reading>{{Reading}}</div>
  18. <div class=meaning>{{Meaning}}</div>
  19.  
  20. ///CSS / STYLING:///
  21.  
  22. .card {
  23. background: url(_truecross2.png);
  24. }
  25.  
  26. .box{
  27. background-color: white;
  28. position: absolute;
  29. height: 50%;
  30. width: 60%;
  31. left: 20%;
  32. top: 20%;
  33. border-radius: 25px;
  34. box-shadow: 5px 5px 10px grey ;
  35. }
  36.  
  37. .kanji {
  38. font-family: UD Digi Kyokasho N-R;
  39. font-size: 60px;
  40. text-align: center;
  41. color: black;
  42. margin-top: 18%;
  43. }
  44.  
  45. .kanji-back {
  46. font-family: Ud Digi Kyokasho N-R;
  47. font-size: 60px;
  48. text-align: center;
  49. color: black;
  50. margin-top: 12.5%;
  51. }
  52.  
  53. .reading {
  54. font-family: UD Digi Kyokasho N-R;
  55. font-size: 50px;
  56. text-align: center;
  57. color: black;
  58. margin-top: 10px;
  59. }
  60.  
  61. .meaning {
  62. font-family: Calibri;
  63. font-size: 50px;
  64. text-align: center;
  65. color: black;
  66. margin-top: 10px;
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement