在JS中很难将div浮动到网页的右侧。
js中的代码是:
var options = {
width: "360px",
height: "240px",
backgroundColor: '#fff',
border: '1px solid #ccc',
borderRadius: 10,
padding: 10,
defaultLat: 51.500152,
defaultLng: -0.126236
};我已经尝试过float-right,有什么建议吗?
发布于 2010-11-09 10:19:38
如果这是一个将JavaScript CSS属性附加到值的对象,那么应该可以这样做
styleFloat: "right", // IE
cssFloat: "right" // W3C编辑: jQuery css()页面提供了我们需要的线索
Internet Explorer的DOM实现将float属性称为styleFloat,而符合W3C标准的浏览器将其称为cssFloat。
https://stackoverflow.com/questions/4129916
复制相似问题