diff --git a/components/Box/Box.css b/components/Box/Box.css index e69de29..8558821 100644 --- a/components/Box/Box.css +++ b/components/Box/Box.css @@ -0,0 +1,5 @@ + +.Box__Header { + font-weight: bold; + padding: 10px 0; +} \ No newline at end of file diff --git a/components/Dropdown/Dropdown.css b/components/Dropdown/Dropdown.css new file mode 100644 index 0000000..e69de29 diff --git a/components/Dropdown/Dropdown.js b/components/Dropdown/Dropdown.js new file mode 100644 index 0000000..c5761db --- /dev/null +++ b/components/Dropdown/Dropdown.js @@ -0,0 +1,11 @@ +class Dropdown { + constructor(element) { + this.element = element; + this.element.addEventListener('mousedown', () => { + Dropdown[0].classList.add('DropDown--Box'); + }); + this.element.addEventListener('mouseout', () => { + Dropdown[0].classList.remove('DropDown--Box'); + }); +} +} \ No newline at end of file diff --git a/components/Section/Section.css b/components/Section/Section.css index e69de29..e279cf2 100644 --- a/components/Section/Section.css +++ b/components/Section/Section.css @@ -0,0 +1,22 @@ +.Section { + box-sizing: border-box; + display: inline-block; + width: 100%; + margin: 0; + padding: 15px; + } + + .Section__Header { + text-align: center; + font-weight: bold; + font-size: 25px; + } + + .Section__Bordered { + border: 1.5px solid black; + } + + .Section__Half { + display: inline-block; + width: 49%; + } \ No newline at end of file diff --git a/index.html b/index.html index 39167c5..1ea4c58 100644 --- a/index.html +++ b/index.html @@ -1,9 +1,33 @@ - + Introduction to the DOM + +
+ +
+
Header
+
+
+
Placeholder
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce risus nibh, gravida nec felis quis, facilisis facilisis lectus. Nulla ac orci pretium, condimentum orci quis, accumsan nisi. Aliquam erat volutpat. Curabitur cursus mattis libero, at viverra risus hendrerit quis. Fusce imperdiet tristique tortor non tincidunt. Mauris accumsan urna nec augue feugiat porta. Proin vitae magna in ex malesuada laoreet eget a nulla. Aliquam tristique et elit at consequat. In hac habitasse platea dictumst.
+
+
+
+
+
Placeholder
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce risus nibh, gravida nec felis quis, facilisis facilisis lectus. Nulla ac orci pretium, condimentum orci quis, accumsan nisi. Aliquam erat volutpat. Curabitur cursus mattis libero, at viverra risus hendrerit quis. Fusce imperdiet tristique tortor non tincidunt. Mauris accumsan urna nec augue feugiat porta. Proin vitae magna in ex malesuada laoreet eget a nulla. Aliquam tristique et elit at consequat. In hac habitasse platea dictumst.
+
+
-
\ No newline at end of file + \ No newline at end of file diff --git a/styles.css b/styles.css index 997c895..33c9c4e 100644 --- a/styles.css +++ b/styles.css @@ -1,5 +1,6 @@ @import './components/Section/Section.css'; @import './components/Box/Box.css'; +@import './components/Dropdown/Dropdown.css'; body { box-sizing: border-box;