Christopher Chu

@christopher404

Joined on Dec 5, 2019

  • The Universal Shorthand Property all: inherit | initial | unset | revert ; Basics Margin margin-top: 40px; margin-right: auto; margin-bottom: 40px; margin-left: auto; margin: 40px auto 40px;
     Like  Bookmark
  • In most cases, the value of this is determined by how a function is called (runtime binding). Usage (Context) Refers to In a Method Owner Object (Which invoked method) Alone Global Object
     Like  Bookmark
  • @layer The @layer CSS at-rule declares a cascade layer. Rules within a cascade layer cascade together, giving more control over the cascade to web developers. @layer utilities { .padding-sm { padding: .5rem; } .padding-lg { padding: .8rem;
     Like  Bookmark
  • <address> <address> <a href="mailto:jim@rock.com">jim@rock.com</a><br> <a href="tel:+13115552368">(311) 555-2368</a> </address> <datalist> <form> <fieldset> <input type="text" list="lang">
     Like  Bookmark
  • Specificity !important > Inline style > ID selector > Class selector > Element selector CSS Specificity Pseudo-classes :root Selects the root element of the document. Mostly used to store global rule values using CSS variable as it applies to the root element.
     Like  Bookmark
  • filter() The filter() method creates a new array of elements that pass the conditional we provide. In other words, if the element passes and returns true, it will be included in the filtered array. And any element that fails or return false, it will be NOT be in the filtered array. let arr = ['html', 'css', 'js', 'css', 'js']; function removeDuplicates(data) { return data.filter((value, index) => arr.indexOf(value) === index); } console.log(removeDuplicates(arr));
     Like  Bookmark
  • Keyword var let const Scope Function Block Block
     Like  Bookmark
  • Attributes controls This is a boolean attribute that specifies whether or not to display the audio controls (ie. start/pause button, scroll, volume). <audio controls></audio> <!-- OR --> <audio controls="true"></audio> Note: If it’s missing, the audio file will not be displayed. Typically, you should always include this. Unless you want to create your own control panel using JavaScript
     Like  Bookmark
  • Alphabetical Order .foo { background: black; bottom: 0; color: white; font-weight: bold; font-size: 1.5em; height: 100px; overflow: hidden; position: absolute;
     Like  Bookmark
  • HTML Image To show a different image in dark mode. <picture> <source srcset="dark.png" media="(prefers-color-scheme: dark)"> <img src="bright.png"> </picture> CSS The prefers-color-scheme CSS media feature is used to detect if the user has requested the system use a light or dark color theme.
     Like  Bookmark
  • Codewar 是一個程式解題平台,上面充滿著各種開發者出的題目,會使用這個平台的理由為: 可以自己寫測試驗證基本測資 過關後可以看到其他人的解答 方便導師追蹤解題成效 注意事項 解題最重要的一點就是:絕對不要輕易看答案。為什麼解題能夠成長?是因為你有思考,思考過後想出來的答案才是你的,如果你放棄了然後去看別人的答案,那就始終是別人的,不會是你自己的。 想了一陣子還是想不出來的話,不用急,去洗個澡或是散個步搞不好就想通了(真心不騙)
     Like 3 Bookmark
  • Loop while count = 0 while (count < 4): print(count) count += 1 """ output: 0
     Like  Bookmark
  • filter() const arr = [1, 2, 2, 3, 4, 4]; const duplicateValues = arr.filter((item, index) => arr.indexOf(item) !== index); console.log(duplicateValues);
     Like  Bookmark
  • 1. Ternary Operator commonly used let isEmpty = true; if (isEmpty === true) { console.log('Empty'); } else { console.log('Is not empty'); } less code
     Like  Bookmark
  • const user = { username: 'Christopher' } 1 function getuser() { if (user) { return user } else { return "No user found" } }
     Like  Bookmark