如何实现类似 Orkut 的用户工具来更改网站颜色和样式?

发布于 2024-09-29 10:51:57 字数 137 浏览 0 评论 0原文

我想实现像 Orkut 提供的功能,用户可以在其中配置网站的颜色和样式,并且更改后的样式将供用户使用。

我希望用户能够输入网站背景、顶部导航和左侧导航的颜色组合。

有人可以让我知道这涉及到哪些技术吗?任何指示都会有所帮助。谢谢。

I would like to implement a facility like Orkut offers where user is able to configure the colors and style for the site, and the changed styles will be used for the user.

I would like the user to be able to enter the color combinations for the site background, top navigation, and left navigation.

Can some one please let me know what all technologies/techniques are involved into this? Any pointers will be helpful. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

生来就爱笑 2024-10-06 10:51:57

最简单的方法是执行以下操作:(PHP)

<?php 
//Query database, find the user's colors and create the $bgColor, $leftColor and $topColor variables
?>
<style type="text/css">
<?php echo "body { background-color: $bgColor; }"; ?>
<?php echo "div.left { background-color: $leftColor; }"; ?>
<?php echo "div.top { background-color: $topColor; }"; ?>
</style>

您可以使其在任何语言上工作。

The easiest way is to do something like this: (PHP)

<?php 
//Query database, find the user's colors and create the $bgColor, $leftColor and $topColor variables
?>
<style type="text/css">
<?php echo "body { background-color: $bgColor; }"; ?>
<?php echo "div.left { background-color: $leftColor; }"; ?>
<?php echo "div.top { background-color: $topColor; }"; ?>
</style>

You can make this work on any language.

爱你不解释 2024-10-06 10:51:57

这里有几个问题询问如何在 Ruby-on-Rails 中执行类似的操作:

那里可能有一些有用的提示。 (我自己从来没有实现过这样的事情。)

Here’s a couple of questions asking how to do something similar in Ruby-on-Rails:

There might be some useful hints in there. (I’ve never implemented anything like this myself.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文