Jump to P4I am P4

What do I need to write in CSS to achieve -p{Background color: yellow;}"> How to use CSS to change the background color of a paragraph after clicking a link in an HTML page-PHP Chinese Network Q&A
How to use CSS to change the background color of a paragraph after clicking a link in an HTML page
P粉311423594
P粉311423594 2023-09-02 00:38:08
0
1
471

Can I change the background color of a paragraph when I click a link on the page.

Jump to P4 

I am P4

What do I need to write in CSS to achieve this -

p {Background color: yellow; }

P粉311423594
P粉311423594

reply all (1)
P粉286046715

You cannot change the properties of an element by clicking on another element, but you can do so through JavaScript. Just add the

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!