css function loop modify