Sometimes cats can become overstimulated while you're petting or stroking them. They enjoy it but when they've had enough they'll lash out and bite you. Some will give warnings but others will not. My cat Sky gives me what I call love bites. I'll be petting him and then he'll bite my hand gently and then he'll lick it. He's never broken the skin. Look for signs like her tail swishing or her ears going back. She may only be able to tolerate a few pets and no more. Good luck.

My female cat Ziggy will also sometimes nip or bite me just out of the blue. I'm always aware that she may do this so I try to be prepared to pull my hands away from her before she bites. For some reason she also likes to bite my hair or head when I pull the curtains closed. She gets very frisky and goofy and will roll on the cat tree but she's also in biting mode. I still don't know what causes her to try to bite me.