How to add a custom CSS in Magento 2
Just follow below step
Step 1:
Make sure your developer mode.
Step 2:
Create the following folder & files
app / design / frontend / [vendor] / [Your_theme] / Magento_Theme / layout / default_head_blocks.xml
app / design / frontend / [vendor] / [Your_theme] / web / css / custom.css
Step 3:
Pace this code within default_head_blocks.xml
<?xml version=”1.0″?>
<page xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”../../../../../vendor/magento/framework/Module/etc/module.xsd”>
<head>
<css src=”css/custom.css” />
</head>
</page>
Step 4:
Deploy static resources (SSH to magento root):
php bin/magento setup:static-content:deploy -f