对于我的JS html5类,我正在尝试创建一个网页,允许用户选择背景颜色,以及他们是想使用SANS SERIF字体还是SANS字体。我有工作的背景颜色--
var inputColor = prompt( "Enter a color name for the " +
"background of this page", "" );
document.body.setAttribute( "style", "background-color: " + inputColor );
我不知道如何使用相同的想法,
在中,在css的第72行到第80行,它说:
/* fonts.css from the YUI Library: developer.yahoo.com/yui/
Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
There are three custom edits:
* remove arial, helvetica from explicit font stack
* we normalize monospace styles ourselves
* tabl