2

I'm trying to create a dynamic cssFile.php which retrieves content from DataBase. with this framework i should be able to change some global css properties and some other properties like Positioning and Resizing them using html form, but i dont know how to structure data in database and even how to create a good layout. should database table be like:

+-------+------------+---
| color | background | ...
+-------+------------+---
| red   | #fff       |
+-------+------------+---

OR like this:

+--------+----------+-------+
| class  | property | value |
+--------+----------+-------+
| .class | color    | red   |
+--------+----------+-------+
4

1 に答える 1

0

このレイアウトのようなものが良いでしょう。

CSS_type - テーブル

+--------+----------+
| id     | type     |
+--------+----------+
| 1      | .class   |
+--------+----------+

CSS_main - テーブル

+--------+----------+-------+------------+
| type   | property | value |  type_name |......
+--------+----------+-------+------------+
| 1      | color    | red   | container  |......
+--------+----------+-------+------------+

...

于 2012-11-20T11:54:07.317 に答える