freeCodeCamp/guide/russian/miscellaneous/change-the-css-of-an-elemen.../index.md

16 lines
523 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Change the CSS of an Element Using jQuery
localeTitle: Изменение CSS элемента с помощью jQuery
---
Мы также можем изменить CSS элемента HTML непосредственно с помощью jQuery.
Query имеет функцию под названием `.css()` которая позволяет вам изменять CSS элемента.
```
<script>
$(document).ready(function() {
$("#target1").css("color", "red");
});
</script>
```