怎么对文字进行style 用<div id=>
2016-02-27
展开全部
function startPosition()
{
div1.style.top = '10<a href="https://www.baidu.com/s?wd=px&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YvPjI-uAPbPHNWnAFbuAPW0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHTsnHbLrHRdnWRdrHTYrHczn0" target="_blank" class="baidu-highlight">px</a>';
div1.style.left = '10<a href="https://www.baidu.com/s?wd=px&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YvPjI-uAPbPHNWnAFbuAPW0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHTsnHbLrHRdnWRdrHTYrHczn0" target="_blank" class="baidu-highlight">px</a>';
div2.style.top = '100<a href="https://www.baidu.com/s?wd=px&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YvPjI-uAPbPHNWnAFbuAPW0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHTsnHbLrHRdnWRdrHTYrHczn0" target="_blank" class="baidu-highlight">px</a>';
div2.style.left = '10px';
div3.style.top = '150px';
div3.style.left = '10px';
}
请加上px进行测试,ok?
{
div1.style.top = '10<a href="https://www.baidu.com/s?wd=px&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YvPjI-uAPbPHNWnAFbuAPW0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHTsnHbLrHRdnWRdrHTYrHczn0" target="_blank" class="baidu-highlight">px</a>';
div1.style.left = '10<a href="https://www.baidu.com/s?wd=px&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YvPjI-uAPbPHNWnAFbuAPW0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHTsnHbLrHRdnWRdrHTYrHczn0" target="_blank" class="baidu-highlight">px</a>';
div2.style.top = '100<a href="https://www.baidu.com/s?wd=px&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YvPjI-uAPbPHNWnAFbuAPW0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHTsnHbLrHRdnWRdrHTYrHczn0" target="_blank" class="baidu-highlight">px</a>';
div2.style.left = '10px';
div3.style.top = '150px';
div3.style.left = '10px';
}
请加上px进行测试,ok?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询