-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
137 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,41 @@ | ||
<style> | ||
.navigation-link{ | ||
font-size: 1.5rem; | ||
nav { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.navigation-link { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 1rem; | ||
} | ||
|
||
.left { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 1rem; | ||
align-items: center; | ||
} | ||
.logo { | ||
width: 60px; | ||
height: 50px; | ||
background: yellow; | ||
border-radius: 10% 35% 35% 10%; | ||
} | ||
</style> | ||
<nav> | ||
<div>Ankan Roy</div> | ||
<br> | ||
<div> | ||
<div class="navigation-link"><a href="/">~Home</a></div> | ||
<div class="navigation-link"><a href="/blog">~Blog</a></div> | ||
<div class="navigation-link"><a href="mailto:8ankanroy@gmail.com">~Colloborate</a></div> | ||
<nav class="max-width"> | ||
<div class="left"> | ||
<div class="logo"></div> | ||
<div> | ||
<div>Ankan</div> | ||
<div>Roy</div> | ||
</div> | ||
</div> | ||
<div class="navigation-link"> | ||
<div><a href="/">~Home</a></div> | ||
<div><a href="/blog">~Blog</a></div> | ||
<div><a href="mailto:8ankanroy@gmail.com">~Colloborate</a></div> | ||
</div> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ import Page from "@/layouts/Page.astro"; | |
--- | ||
|
||
<Page> | ||
<h1>I like simple and clean website!</h1> | ||
|
||
</Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
title: 'sudo selector in css?' | ||
pubDate: 2024-04-19 | ||
description: 'sudo selector in css!' | ||
author: 'Ankan Roy' | ||
layout: ../../layouts/Page.astro | ||
--- | ||
|
||
1. **::before**: | ||
- This pseudo-element inserts content before the content of the selected element. | ||
- It's commonly used to add decorative elements or textual content before an element. | ||
- You can define its style using CSS properties like `content`, `display`, `position`, `background`, etc. | ||
- Example: | ||
```css | ||
.element::before { | ||
content: "Before text"; | ||
display: block; | ||
background-color: #ccc; | ||
} | ||
``` | ||
|
||
2. **::after**: | ||
- This pseudo-element inserts content after the content of the selected element. | ||
- It's often used for decorative purposes or to add additional content to an element. | ||
- Like '::before', you can style it using various CSS properties. | ||
- Example: | ||
```css | ||
.element::after { | ||
content: "After text"; | ||
display: block; | ||
color: red; | ||
} | ||
``` | ||
|
||
1. **::first-line**: This pseudo-element targets the first line of text within an element. It allows you to style only the first line, such as changing its font, color, or adding decorations. | ||
|
||
```css | ||
p::first-line { | ||
font-weight: bold; | ||
color: blue; | ||
} | ||
``` | ||
|
||
2. **::first-letter**: Similar to `::first-line`, `::first-letter` targets the first letter of the text content within an element. It's often used for decorative purposes or for drop caps. | ||
|
||
```css | ||
p::first-letter { | ||
font-size: 150%; | ||
color: red; | ||
} | ||
``` | ||
|
||
3. **::placeholder**: This pseudo-element targets the placeholder text in an input field or textarea. It allows you to style the placeholder text separately from the input text. | ||
|
||
```css | ||
input::placeholder { | ||
color: #999; | ||
font-style: italic; | ||
} | ||
``` | ||
|
||
4. **::selection**: This pseudo-element allows you to style the portion of a document that has been highlighted by the user. It's commonly used to customize the appearance of selected text. | ||
|
||
```css | ||
::selection { | ||
background-color: #ffcc00; | ||
color: #333; | ||
} | ||
``` | ||
|
||
5. **::marker**: This pseudo-element targets the marker box of a list item. It allows you to style the bullet or numbering of list items. | ||
|
||
```css | ||
ul::marker { | ||
color: blue; | ||
} | ||
``` |